RETURNS THE SIGN OF V
ACTION
The function SGN(V) returns the sign of V: 1 if positive, -1 if negative, 0 if zero.
V can be a real or integer number.
SYNTAX:
Result=SGN(V)
USE ERROR EXAMPLE
rem EXAMPLE 1
print sgn(2.1)
print "Result = 1"
rem ---------------
rem EXAMPLE 2
print sgn(-2.1)
print "Result = -1"
rem ---------------
rem EXAMPLE 3
print sgn(0)
print "Result = 0"
SGN()
SGN(V)
SEE ALSO
-