Abs

From UODemo Wiki
Revision as of 10:20, 25 January 2010 by Batlin (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

integer abs(integer AnyInteger);

This returns the absolute value of an integer. Integers range from −2147483648 to +2147483647. Please note that abs(-2147483648) will return -2147483648 since its absolute value 2147483648 is outside the range of the integer type.

if( abs(−2147483647) == 2147483647 )
{
  systemMessage(this, "abs() test succeeded");
}
else
{
  systemMessage(this, "abs() test failed");
}


Return to the Command List.