Basic
\
Integer Division. BASIC rounds both operands to integers
and truncates the result to an integer. Integer division is
faster than standard division. For example, 10
\
4
is
2.
Modulus Arithmetic. BASIC performs integer division as
described above and returns the
remainder
as an integer
value. For example, 10 MOD
3
results in
1.
+
,
-
Addition, Subtraction. For example,
2
+
9
is
11,
and
15-8
is
7.
When BASIC evaluates an arithmetic expression, all operands and
the result are converted to the same degree of precision as the most
precise operand. The arithmetic operators are listed in order of
precedence, that is, the order in which BASIC executes them if
1
or more operators are in the same statement.
MOD
String Operator
The only string operator is the plus sign
(+).
It appends
1
string
to another. For example:
PRINT
"JOSEPH
'I
+
"P.
I'
+
"RAWLINGS"
prints JOSEPH P. RAWLINGS.
Relational Operators
The relational operators and their meanings are, in order of
precedence:
Equal. Both operands are equal.
Less Than. The first operand is less than or precedes
the second operand.
Greater Than. The first operand is greater than or
follows the second operand.
><
or
<>
Inequality. The operands are not equal.
<=
or
=<
Less Than or Equal
To.
The first operand is less than
(precedes) or is equal to the second operand.
>
=
or
=>
Greater Than or Equal To. The first operand
is
greater
than (follows) or is equal to the second operand.
- -
<
>
12
Tandy
1000