ForthVM.Words.Logic (ForthVM v0.5.0) View Source
Comparison, logic and bitwise words
Link to this section Summary
Functions
&: ( x y -- v ) bitwise and
~: ( x -- v ) bitwise not
|: ( x y -- v ) bitwise or
<<: ( x y -- v ) bitwise shift left
: ( x y -- v ) bitwise shift right
^: ( x y -- v ) bitwise xor
false: ( -- bool ) the false constant
true: ( -- bool ) the true constant
=: ( x y -- bool ) check two values are equal. Works on different types
: ( x y -- bool ) check if x is greater than y
=: ( x y -- bool ) check if x is greater than or equal to y
and: ( x y -- bool ) logical and
not: ( x -- bool ) logical not
or: ( x y -- bool ) logical or
<: ( x y -- bool ) check if x is less than y
<=: ( x y -- bool ) check if x is less than or equal to y
<>: ( x y -- bool ) check two values are different. Works on different types
0=: ( x -- bool ) check value is euqal to 0
0>: ( x -- bool ) check if value is greater than zero
0<: ( x -- bool ) check if value is less than zero
Link to this section Functions
&: ( x y -- v ) bitwise and
~: ( x -- v ) bitwise not
|: ( x y -- v ) bitwise or
<<: ( x y -- v ) bitwise shift left
: ( x y -- v ) bitwise shift right
^: ( x y -- v ) bitwise xor
false: ( -- bool ) the false constant
true: ( -- bool ) the true constant
=: ( x y -- bool ) check two values are equal. Works on different types
: ( x y -- bool ) check if x is greater than y
=: ( x y -- bool ) check if x is greater than or equal to y
and: ( x y -- bool ) logical and
not: ( x -- bool ) logical not
or: ( x y -- bool ) logical or
<: ( x y -- bool ) check if x is less than y
<=: ( x y -- bool ) check if x is less than or equal to y
<>: ( x y -- bool ) check two values are different. Works on different types
0=: ( x -- bool ) check value is euqal to 0
0>: ( x -- bool ) check if value is greater than zero
0<: ( x -- bool ) check if value is less than zero