AT&T 6300 Programmer's Manual page 458

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

SGN
Function
Syntax
Remarks
Example
7-302
Returns 1 if the argument is positive, 0 if the
argument is zero, and -1 if the argument is
negative.
SGN ( numexp )
If numexp>O, SGN( numexp ) returns
1.
If numexp+O, SGN( numexp ) returns
o.
If numexp<O, SGN( numexp ) returns
-1.
50 ON SGN (Xl + 2 GOTO 300,400,500
branches to:
300 if numexp is negative, 400 if numexp is 0,
and 500 if numexp is positive.

Advertisement

Table of Contents
loading

Table of Contents