Programming Reference Manual
Sgn
Syntax
Sgn(
Num
)
Description
Return the sign.
Parameter
Description
Num
Return the sign of this numeric value. Return -1 for negative. Return 0 for zero. Return 1 for positive.
See Also
Abs
.
Example
Sub
Main
Debug
.
Print
Sgn
(9)
' 1
Debug
.
Print
Sgn
(0)
' 0
Debug
.
Print
Sgn
(-9)
'-1
End
Sub
Home
IDE Overview
Declarations
Data Types
Assignment
Flow Control
Error Handling
Conversion
Variable Info
Constant
Math
Math
Abs
Atn
Cos
Exp
Fix
Int
Log
Randomize
Rnd
Round
Sgn
Sin
Sqr
Tan
Financial
Strings
StringClass
Objects
Time/Date
File
User Input
User Dialog
Dialog Functions
Web Form
CCL (web server)
DDE
Settings
Miscellaneous
Operator
Translator