PRINT
33
-
11.1
single-precision subtraction is performed.
PRINT
12.3a587880123a587
- 11
double-precision subtraction
is
performed.
String
Operator
BASIC has a string operator (+) which allows you to concatenate
(link) two strings into one. This operator should be used as part of a
string expression. The operands are both strings and the resulting
value is one piece of string data.
The
+ operator links the string
on
the right of the sign to the string on
the left. For example:
PRINT
"CATS"
+ "LOI.JE" +
"MICE"
prints:
CATSLOl.JEM
I
CE
Since BASIC does not allow one string to
be
longer than 255
characters, you will get
an
error if your resulting string is too long.
Relational
Operators
Relational operators compare two numerical or two string expressions
to form a relational expression. This expression reports whether the
comparison you set
up
in
your program is true or false. It returns a
-1
if the relation is true; a
(I)
if it is false.
Numeric
Relations
This is the meaning of the operators when you use them to compare
numeric expressions:
< Less than
> Greater than
Equal to
< > or > < Not equal to
= < or < = Less than or equal to
= > or > = Greater than or equal to
Examples of true relational expressions:
1 < 2
2 < > 5
2
<=
5
2
<=
2
5
> 2
7 7
2-42