VBScript Sgn Function
Complete VBScript Reference
The Sgn function returns an integer that indicates the sign of a specified number.
Syntax
Parameter |
Description |
number |
Required. A valid numeric expression If number is:
- >0 - Sgn returns 1
- =0 - Sgn returns 0
- <0 - Sgn returns -1
|
Example 1
document.write(Sgn(15))
Output:
1
|
Example 2
document.write(Sgn(-5.67))
Output:
-1
|
Example 3
document.write(Sgn(0))
Output:
0
|
Complete VBScript Reference
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|