|
|
|
|
MOUSE-2002 EXPRESSIONS
Expression | Mouse code | Notes |
Convert X to Boolean 0, 1 | X. 0> | (x > 0) |
X AND Y | X. Y. * | (if X and Y are 0 or 1) |
X. 0> Y. 0> * | (for any X, Y) |
X OR Y | X. Y. + | (if X and Y are 0 or 1; gives 2 if X and Y are both 1) |
X. Y. + 0> | (if X and Y are 0 or 1) |
X. 0> Y. 0> + 0> | (for any X, Y) |
NOT(X) | X. 0= | (if X is 0 or 1) |
X. 0> 0= | (for any X) |
if (X == 0) then S | X. 0 = [S] | (x = 0) |
if (X != 0) then S | X. 0 = 0= [S] | (NOT(x = 0)) |
X. 0 &NE [S] | (x != 0) |
if (X > 0) then S | X. 0 > [S] | (x > 0) |
X. [S] | |
if (X >= 0) then S | X. 0 1- > [S] | (x > -1) |
X. 1_ > [S] | (x > -1) |
X. 1+ 0> [S] | (x+1 > 0) |
X. 1+ [S] | (x+1 > 0) |
X. 0 < 0= [S] | (NOT(x < 0)) (BEST) |
X. 0 > X. 0 = + [S] | (x>0 OR x=0) |
X. 0 &GE [S] | (x >= 0) |
if (X < 0) then S | X. 0 < [S] | |
if (X <= 0) then S | X. 1 < [S] | (x < 1) |
X. 1- 0 < [S] | (x-1 < 0) |
X. 0 > 0= [S] | (NOT(x > 0)) (BEST) |
X. 0 < X. 0 = + [S] | (x<0 OR x=0) |
X. 0 &LE [S] | (x <= 0) |
if (X == A) then S | X. A. = [S] | (x = a) |
if (X != A) then S | X. A. = 0= [S] | (NOT(x = a)) |
X. A. &NE [S] | (x != a) |
if (X > A) then S | X. A. > [S] | (x > a) |
if (X >= A) then S | X. A. 1- > [S] | (x > a-1) |
X. 1+ A. > [S] | (x+1 > a) |
X. A. < 0= [S] | (NOT(x < a)) (BEST) |
X. A. > X. A. = + [S] | (x>a OR x=a) |
X. A. &GE [S] | (x >= a) |
if (X < A) then S | X. A. < [S] | (x < a) |
if (X <= A) then S | X. A. 1+ < [S] | (x < a+1) |
X. 1- A. < [S] | (x-1 < a) |
X. A. > 0= [S] | (NOT(x > a)) (BEST) |
X. A. < X. A. = + [S] | (x<a OR x=a) |
X. A. &LE [S] | (x <= a) |
Case statement | B [ S | C [ T | D [ U | V ] ] ] | if B then S else if C then T else if D then U else V |
while (B) S | ( B ^ S ) | |
do S while B | ( S B ^ ) | |
for I=1 to 10 S | 1 I: ( I. 11 < ^ S I. 1+ I: ) | |
for I=10 to 1 step -1 S | 10 I: ( I. 0 > ^ S I. 1- I: ) | |
loop forever S | ( S ) | |
break (out of loop) | 0 ^ | |
if (x == y) break; | X. Y. = [ 0 ^ ] | |
continue | &CONT | (Could use ")", but it would confuse skip().) |
if (x == y) continue; | X. Y. = [ &CONT ] | |
Print a ! character | 33 !' | |
Contact Information
I may be contacted at:
|
|