User Tools

Site Tools


pf:rpldocs:comparators
comparators.txt
=CMD
=COMMAND gt (number number) bool
=DESC 
Top two items are popped from the stack and 'Greater Than' comparison is performed. 0 or 1 is pushed back to the stack where 1 indicates true.
=ENDDESC
=EX 
if (2 gt (1))
	trace("2 is greater than 1")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND gte (number number) bool
=DESC 
Top two items are popped from the stack and 'Greater Than or Equal' comparison is performed. 0 or 1 is pushed back to the stack where 1 indicates true.
=ENDDESC
=EX 
if (2 gte (2))
	trace("2 is greater than or equal to 2")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND lt (number number) bool
=DESC 
Top two items are popped from the stack and 'Less Than' comparison is performed. 0 or 1 is pushed back to the stack where 1 indicates true.
=ENDDESC
=EX 
if (1 lt (2))
	trace("1 is less than 2")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND lte (number number) bool
=DESC 
Top two items are popped from the stack and 'Less Than or Equal' comparison is performed. 0 or 1 is pushed back to the stack where 1 indicates true.
=ENDDESC
=EX 
if (1 lte (1))
	trace("1 is less than or equal to 1")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND eq (number number) bool
=DESC 
Top two items are popped from the stack and 'Equal' comparison is performed. 0 or 1 is pushed back to the stack where 1 indicates true.
=ENDDESC
=EX 
if (1 eq (1))
	trace("1 is equal to 1")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND neq (number number) bool
=DESC 
Top two items are popped from the stack and 'Not Equal' comparison is performed. 0 or 1 is pushed back to the stack where 0 indicates false and 1 indicates true.
=ENDDESC
=EX 
if (1 neq (2))
	trace("1 is not equal to 2")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND eq0 (number) bool
=DESC 
Top item is popped from the stack and Compared to 0. 0 or 1 is pushed back to the stack where 0 indicates false and 1 indicates true.
=ENDDESC
=EX 
if (0 eq0)
	trace("0 is equal to 0")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND neq0 (number) bool
=DESC 
Top item is popped from the stack and Compared to not being 0. 0 or 1 is pushed back to the stack where 0 indicates false and 1 indicates true.
=ENDDESC
=EX 
if (1 neq0)
	trace("1 is not equal to 0")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND true bool
=DESC 
Pushes a 1 onto the stack.
=ENDDESC
=EX 
if (true)
	trace("True")
endif
=ENDEX
=ENDCMD

=CMD
=COMMAND false bool
=DESC 
Pushes a 0 onto the stack.
=ENDDESC
=EX 
if (not(false))
	trace("not false")
endif
=ENDEX
=ENDCMD
pf/rpldocs/comparators.txt · Last modified: 2016/10/17 17:29 by planetfall