History |
Sgn (math)
Purpose
Returns an integer value indicating the sign of a number.
Syntax
Sgn (NumericExpression)
Example
Sub Main()
Dim dbl As Double
Dim mysign As Integer
dbl = 3.1415
mysign = Sgn (dbl)
If mysign < 0 Then
Print "The value of 'dbl' is negative"
Else
If mysign > 0
Print "The value of 'dbl' is positive"
Else
Print "The value of 'dbl' is zero"
End If
End If
End Sub
| ||||||||||||