Difference between revisions of "SHIP:Sail:abs"

From Serious Documentation
Jump to: navigation, search
(Created page with "__NOTOC__ See Also: *SHIP Sail Home *SHIP Sail Function Home *min(), max() == abs == Gets the absolu...")
 
(Examples)
Line 29: Line 29:
  
 
== Examples ==
 
== Examples ==
 +
{| class="wikitable" style="margin: 1em 1em;"
 +
! scope="col" style="text-align:left" | Example
 +
! scope="col" style="text-align:left" | Result
 +
! scope="col" style="text-align:left" | Notes
 +
|-
 +
|<code>abs(-5);</code> || 5 ||
 +
|-
 +
|<code>abs(0);</code> || 0 ||
 +
|-
 +
|<code>abs(6);</code> || 6 ||
 +
|}

Revision as of 17:26, 6 December 2012

See Also:

abs

Gets the absolute value of a number.

Prototype

Integer abs(Integer number);

Parameters/Return Value

Parameter Data Type Description
number Integer The number to take the absolute value of
Return Integer the absolute value of "number"

Detailed Description

The abs(number) function returns the absolute value of the specified number.

Examples

Example Result Notes
abs(-5); 5
abs(0); 0
abs(6); 6