This page is from the CGCE by Tom Lynn.
For example, the statement
I = 3 => Goto 5would be handled as follows:
Pre-9x50s 9x50s
I = 3 => Goto 5 I = 3 => Goto 5
(I) = (3) => (Goto 5) (I = 3) => (Goto 5)
(Goto 5) (1) => (Goto 5)
(Goto 5)
The difference is that on older models the relational operators (=,
<, >, <=, >=, <>)
were considered to be syntactic breakpoints, part of the conditional statement
format. To test whether or not to carry out the Goto 5 they simply
tested whether I = 3.
On 9x50s though, every expression which includes a relational operator is assigned a value of either 0 or 1 when it is evaluated (0 = FALSE, 1 = TRUE). A condition is then carried out as long as the entire expression which precedes the => is non-zero. So on a 9x50, this is legal code:
123.456 => "WIBBLE"
X = 3 => 20 -> Y X <> 3 => 50 -> Ycan be converted to
50 - 30(X=3) -> YYou can also put a number of boolean expressions together. For example, instead of using
If ((X > 30) And (Y < 20)) Then X + 27 -> Y IfEnd;you can use
X + 27(X > 30)(Y < 20) -> Y
You can shorten expressions by using the logical similarities between " And " and " Or " and multiplication and addition. For example, instead of:
((X = 1) And (X-3 > B)) Or (Y=2) => Goto 5you can use
(X = 1)(X-3 > B) + (Y = 2) => Goto 5
For a number of more advanced examples, see lists.html.