•
•
•
SuperBASIC expressions can be string, numeric, logical
or
a mixture; unsuitable data
types
are
automatically converted
to
a
sUitable
form
by
the
system
wherever
this
is
possible.
monop:=
1+
1-
INOT
expression;= 1 [monop] expression operator expression
I (expression)
I atom
atom:
= variable
constant
function [ (expression
* [ , expression] *) I
array_element
variable: = 1 identifier
I identifier %
I identifier $
function: = I identifier
1 identifier %
1 identifier $
constant= 1 digit *[digit] *
1 * [digit]
*.
* [digit] *
1 * [digiti *
[.]
* [digit] * E * [digit] *
The
final
value returned
by
the
evaluation
of
the expression can be integer giving
an
integer_expression, string giving a string_expression or floating
pOint
giving a
f1oatin9-expression.
Often
floating point and integer expressions
are
equivalent and
the term numeric_expression
is
then used.
Logical operators can be included
in
an
expression.
If
the specified operation
is
true
then a one
is
returned
as
the
value
of the operation.
If
the operation
is
false
then a
zero
is
returned. Though logical operators can be used
in
any
expression
they
are
usually
used
in
the expression part
of
an
IF
statement.
example;
i.
test
data
+
23.3
+ 5
ii.
"abcdefghi
jklmnopqrstuvwxyz"(2
TO
4)
iii.
32.1
*
(colour=1)
IV.
count
=
-Limit
12184
expressions
define
21