FANDOM


:sign(value)

This returns 1 if the value is greater than 0, 0 if the value is zero, or -1 if the value is less than 0.

ExampleEdit

:Prompt x
:sign(x)→s
:If s=0:Disp "X=0"
:If s=1:Disp "X>0"
:If s=-1:Disp "X<0"

This prompts for a value. Then it perform the sign function on the value. Using the result, it determines whenther X is greater than, is less than , or is zero.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.