Reference
ERRORS
Grid Errors
The third parameter, dp, specifies the number of tigures after the decimal point
in
the
converted
string.
It
should always be included, although
its
value
is
ignored tor
Integer,
general and monetary formats.
SQR(n)
Returns the square root of
the
nurnber
n,
which must not be negative.
SUM(range)
Note that the value returned by the function
IS
the surn
of
the
exact values
in
the relevant
cells
It
does not take
Into
account any rounding that may result tram use of the Units
command.
For
exarnple,
If
two cells contain the values
3.44
and
9.73,
the sum( )function
Will
add them
to
give
13.17.
If
you
then select a display
In
decimal format with one decimal
place, the two nurnbers
will
be rounded
to
3.4
and
9.7.
The sum, whose value will
still
be
13.17,
will be rounded
to
an apparently Inaccurate
13.2.
See the units cornmand.
TAN(n)
Returns the tangent of the specified (radian) angle.
TIME( )
Returns,
as
text,
the time of day
In
the format "HH:MM:SS':
You
must
first
have set the
systern
clock,
as
desrlbed
in
the SuperBASIC keyword guide.
VAL(text)
Val
converts the text
to
its
equivalent nurneric
value.
It
will
only convert text composed
of valid numeric characters and the conversion
Will
stop
at
the
first
character that cannot
be interpreted
as
a digit. For example, val("2.2ABC")
will
return the value 2.2, and
val('~BC")
will
return
00
WIDTH( )
Returns the
Width,
in
character spaces, of the current colurnn. Note that there
IS
one
space separating adjacent columns.
Any syntax error
in
a formula - such
as
supplying the wrong number of arguments
for a function, or mis-matched brackets -
will
be reported
at
the time
you
type
in
the
formula.
You
are told the nature of the error and the formula
is
left
in
the input
line.
You
can then examine
it.
and then correct
it
with the line
editor.
The possible error messages are listed below.
Message
Example
Missing closing quotes
in
a string
"abc"
+
"def
Badly formed numeric constant
1 .
5e
(rnisslng number after
el
t.
Number too large
1.5e99
'.-
Illegal character
12
5
(underscore instead of minus)
-
All
names must
refer
to
columns
All
names must refer
to
rows
Name references may only be relative
(see the section
on
Cell References,
earlier
in
this chapter)
Badly formed range reference
a1 :
Badly formed name reference
c3.
Name
is
not a
row
or column
(see Chapter
3)
First name reference undefined
Second name reference undefined
(the text does not appear
in
the
grid, above and
to
the
left
of
thiS
cell)
Function requires a range reference
i
rr(1
,2,3)
(see description of irr(
))
Illegal range
Syntax error
,.
Mismatched brackets
"-
Type
mismatch 1 +
"abc"
48
12/84