VBScript Sgn Function
Sgn function returns an integer may indicate a specified number of symbols.
grammar
Sgn(number)
参数 | 描述 |
---|---|
number | 必需。有效的数值表达式。 如果数字是:
|
Examples
Examples
<script type="text/vbscript">
document.write(Sgn(15) & "<br />")
document.write(Sgn(-5.67) & "<br />")
document.write(Sgn(0))
</script>
document.write(Sgn(15) & "<br />")
document.write(Sgn(-5.67) & "<br />")
document.write(Sgn(0))
</script>
Examples of the above output:
1
-1
0
-1
0
try it"
Complete VBScript Reference