To properly display this page you need a browser with JavaScript support.
HTBasic Help
×
Menu
Index
Search
Search
Reference
HTBasic Keywords
SGN - Returns the arithmetic sign of an expression.
Previous page
Next page
Print version
(c) TransEra Corp, 2021
To properly display this page you need a browser with JavaScript support.
SGN
Returns the arithmetic sign of an expression.
SGN (numeric-expression)
Usage:
Xsgn=SGN(X)
Discriminate=SGN(B*B-4*A*C)
Example:
SGN.BAS
Description:
SGN
returns a value of 1 if the numeric expression is positive, a value of -1 if it is negative and 0 if it is zero.
See Also:
ABS
,
FRACT
,
INT
,
MAXREAL
,
MINREAL
,
MOD
,
MODULO