Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual
Page 118
RPBASIC-52 PROGRAMMING GUIDE
2-99
SGN
Syntax:
S G N (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:
Comm and, run
Use:
PRINT SGN(S IN(X)))
Cards:
All
D E S C R IP T I ON
Use SG N in level con trol applications. If a level is high or low, it can direct co ntrol to the appropriate
p ro g ra m .
EXAMPLE
100 ON SGN(A)+1 GOSUB 2000,3000,4000