QBasic 1.1: SGN Function

Syntax

ABS(numeric-expression)
SGN(numeric-expression)

Description / Parameter(s)

numeric-expression Any numeric expression.

Example

PRINT ABS(45.5 - 100!) 'Output is: 54.5 PRINT SGN(12), SGN(-31), SGN(0) 'Output is: 1 -1 0