Expressions in Conditionals [ COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00) ] MPE/iX Communicators
COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00)
Expressions in Conditionals
Allow arithmetic expressions in conditional statements.
Syntax
(no new syntax)
Parameters
test-variable The class of objects which can be specified as a test
variable is extended to include an arithmetic expression
(enclosed in square brackets) which will be evaluated
before the comparison is made.
value The class of objects which can be specified as a
comparison value is extended to include an arithmetic
expression which will be evaluated before the comparison
is made.
Discussion
This enhancement permits users to include arithmetic expressions on the
left and right hand sides of a boolean expression.
Example
1) IF (AREA) = [(LENGTH)*(WIDTH)],[(BASE)*(HEIGHT)*.5],
[(3.1416)*(RADIUS)**2] THEN ...;
2) REPEAT
FIND(SERIAL) STK-ON-HAND,STATUS
UNTIL ((WEIGHT) > [(KILO-PER-METER) * (METERS)] AND
(METERS) > (MIN-LENGTH) OR
(PRICE) > [(UNIT-PRICE) * (KILO-PER-METER) * (METERS)]);
MPE/iX Communicators