Previous Next
990
APPENDIX B Operators in Type 4 Functions
B.2 Relational, Boolean, and Bitwise Operators
any1 any2 eq bool Test equal
any1 any2 ne bool Test not equal
num1 num2 gt bool Test greater than
num1 num2 ge bool Test greater than or equal
num1 num2 lt bool Test less than
num1 num2 le bool Test less than or equal
bool1 | int1 bool2 | int2 and bool3 | int3 Perform logical | bitwise and
bool1 | int1 bool2 | int2 or bool3 | int3 Perform logical | bitwise inclusive or
bool1 | int1 bool2 | int2 xor bool3 | int3 Perform logical | bitwise exclusive or
bool1 | int1 not bool2 | int2 Perform logical | bitwise not
int1 shift bitshift int2 Perform bitwise shift of int1 (positive is left)
– true true Return boolean value true
– false false Return boolean value false
B.3 Conditional Operators
bool { expr } if – Execute expr if bool is true
bool { expr1 } { expr2 } ifelse – Execute expr1 if bool is true, expr2 if false
B.4 Stack Operators
any pop – Discard top element
any1 any2 exch any2 any1 Exchange top two elements
any dup any any Duplicate top element
any1 … anyn n copy any1 … anyn any1 … anyn Duplicate top n elements
anyn … any0 n index anyn … any0 anyn Duplicate arbitrary element
anyn−1 … any0 n j roll any( j−1) mod n … any0 anyn−1 … anyj mod n
Roll n elements up j times
Previous Next