Alphabetical List of ColdFusion Functions
Sgn
Description
Determines the sign of a number. Returns 1 if number is positive; 0 if number is 0; -1
if number is negative.
Category
Mathematical functions
Sgn(number)
Syntax
See also
Abs
Parameters
Parameter
number
Example
<!--- This example shows the use of Sgn --->
<html>
<head>
<title>Sgn Example</title>
</head>
<body>
<H3>Sgn Example</H3>
<P>Sgn determines the sign of a number. Returns
1 if number is positive; 0 if number is 0; and -1 if
number is negative.
<P>Sgn(14): <cfoutput>#Sgn(14)#</cfoutput>
<P>Sgn(21-21): <cfoutput>#Sgn(21-21)#</cfoutput>
<P>Sgn(-0.007): <cfoutput>#Sgn(-0.007)#</cfoutput>
</body>
</html>
Description
A number
593
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?