Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Sgn - function of language VBScript

Description:
Returns an integer indicating the sign of a number.

For the purposes of PROMOTIC system, it is more usefull to use the method: Pm.Sign.

Syntax:
Sgn(number As Double) As Integer
Calling:
n = Sgn(number)
Parameters:
number(Double) Any valid numeric expression.
Return Values:
1 - greater than 0
0 - equal 0
-1 - less than 0
Example:
Dim nVar1, nVar2, nVar3, nSign
nVar1 = 12: nVar2 = -2.4: nVar3 = 0
nSign = Sgn(nVar1) ' Returns 1
nSign = Sgn(nVar2) ' Returns -1
nSign = Sgn(nVar3) ' Returns 0
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice