SGN

From QB64 Wiki
Revision as of 19:41, 9 September 2009 by imported>Clippy (Created page with 'The '''SGN''' function returns the sign of a number value. ''Syntax:'' sign% = SGN(value) * Returns -1 when a sign is negative. * Returns 0 when a value is zero. * Returns …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The SGN function returns the sign of a number value.


Syntax: sign% = SGN(value)


  • Returns -1 when a sign is negative.
  • Returns 0 when a value is zero.
  • Returns 1 when a value is positive.
  • Used to hold the original sign of a number.


See also: ABS