VBScript Sgn Function

The Sgn function returns an integer that indicates the sign of a specified number."

Example

Example

<%

response.write(Sgn(15) & "<br />")
response.write(Sgn(-5.67) & "<br />")
response.write(Sgn(0))

%>

The output of the code above will be:

1
-1
0

❮ Complete VBScript Reference