SGN
Syntax
Description
Returns the sign of a numeric expression as follows: * -1 if the number is negative * 0 if the number is zero * 1 if the number is positive
The returned value type is byte.
Examples
Remarks
- This function is 100% Sinclair BASIC Compatible
- If the argument is an unsigned value, the result will always be either 0 or 1
- Using SGN with string expressions will result in a compile-time error