
RPBASIC-52 PROGRAMMING GUIDE
2-99
SGN
Syntax: SGN(expr)
Function: Returns +1 if expr is greater than zero, zero if the expr equals zero, and -1 if expr is less than zero.
Mode: Command, run
Use: PRINT SGN(S IN(X)))
Cards: All
DESCRIPTION
Use SGN in level con trol applications. If a level is high or low, it can direct control to the appropriate
program.
EXAMPLE
100 ON SGN(A)+1 GOSUB 2000,3000,4000
Commenti su questo manuale