112
Command, function and parameter description Section 6-3
6-3-4 Subtract: –
Type: Arithmetic Operation
Syntax:
expression_1
-
expression_2
Description: The subtract operator “–” subtracts any two valid expressions.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example: VR(0) = 10-(2.1*9)
The parentheses are evaluated first, and the result, 18.9, is subtracted from
10. Therefore, VR(0) would contain the value –8.9.
6-3-5 Divide: /
Type: Arithmetic Operation
Syntax:
expression_1
/
expression_2
Description: The divide operator “/” divides any two valid expressions.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example: a = 10/(2.1+9)
The parentheses are evaluated first, and then 10 is divided by the result, 11.1.
Therefore,
a
would contain the value 0.9009
6-3-6 Is Less Than: <
Type: Logical Operation
Syntax:
expression_1
<
expression_2
Description: The less than operator “<“ returns TRUE if
expression_1
is less than
expression_2
, otherwise it returns FALSE.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example: IF VR(1) < 10 THEN GOSUB rollup
If the value returned from VR(1) is less than 10, then subroutine ”rollup” would
be executed.
6-3-7 Is Less Than Or Equal To: <=
Type: Logical Operation
Syntax:
expression_1
<=
expression_2
Description: The less than or equal to operator “<=” returns TRUE if
expression_1
is less
than or equal to
expression_2
, otherwise it returns FALSE.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example: maybe = 1 <= 0