oF9LW‖

MQwDK‖Sgn Function

7BADP‖Returns an integer number between -1 and 1 that indicates if the number that is passed to the function is positive, negative, or zero.

WeAbo‖Syntax:


8TFfk‖Sgn (Number)

R9qZJ‖Return value:

Integer

hBAHj‖Parameters:

rBEUj‖ Number: Numeric expression that determines the value that is returned by the function.

R8M7A‖Number

ZhDdh‖Return value

GJ8DT‖negative

owL6c‖Sgn returns -1.

0

WLxTV‖Sgn returns 0.

4tinv‖positive

DHyxd‖Sgn returns 1.


SEjHR‖Error codes:

5 Invalid procedure call

EhBsF‖Example:


Sub ExampleSgn
8DzwZ‖    Print sgn(-10) ' returns -1
iXFPT‖    Print sgn(0) ' returns 0
C9tZb‖    Print sgn(10) ' returns 1
End Sub