Release calc version 2.10.2t30

This commit is contained in:
Landon Curt Noll
1996-07-06 04:17:00 -07:00
commit 4618313a82
388 changed files with 85904 additions and 0 deletions

39
help/newerror Normal file
View File

@@ -0,0 +1,39 @@
NAME
newerror - create a new error type
SYNOPSIS
newerror([str])
TYPES
str non-null string
return error-value
DESCRIPTION
With or without an argument, newerror() creates an error-value
different from already existing error-values. With the argument
str, if x == newerror(str), strerror(iserror(x)) returns str.
EXAMPLE
> e1 = newerror("Non-positive side")
> e2 = newerror("Non-triangle sides")
> define area(a,b,c) {\
> local s;\
> if (!(a > 0) || !(b > 0) || !(c > 0)) return e1;\
> s = (a + b + c)/2;\
> if (s <= a || s <= b || s <= c) return e2;\
> return sqrt(s * (s - a) * (s - b) * (s - c)); }
> print strerror(iserror(area(8,2,5)))
Non-triangle sides
LIMITS
none - XXX - is this correct?
LIBRARY
none
SEE ALSO
errorcodes, iserror, error