Absolute (Float function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (match syntax diagram to revised template; fix tags.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Template:Float:Absolute subtitle}} | {{Template:Float:Absolute subtitle}} | ||
The <var>Absolute</var> [[Intrinsic classes|intrinsic]] function operates on a <var>Float</var> object and returns a number that is the absolute value of the method object. | |||
that is the absolute value of the method object | |||
==Syntax== | ==Syntax== | ||
Line 9: | Line 7: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%number</th><td>A variable to receive the numeric result of the <var>Absolute</var> method.</td></tr> | ||
<tr><th> | <tr><th>float</th><td>A <var>Float</var> value.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | |||
<ul><li>The <var>Absolute</var> function is available as of <var class="product">[[Sirius Mods]]</var> Version 7.3</ul> | |||
==Examples== | ==Examples== | ||
The following statement places into %y the absolute value of the number in %x: | <ol><li>The following statement places into %y the absolute value of the number in %x: | ||
<p class="code">%y = %x:absolute | <p class="code">%y = %x:absolute | ||
</p> | </p> | ||
The following statement returns 6.4 to %y: | <li>The following statement returns 6.4 to %y: | ||
<p class="code">%y = -6.4:absolute | <p class="code">%y = -6.4:absolute | ||
</p></ol> | |||
==See also== | ==See also== | ||
{{Template:Float:Absolute footer}} | {{Template:Float:Absolute footer}} |
Latest revision as of 06:12, 3 February 2011
Absolute value of a number (Float class)
The Absolute intrinsic function operates on a Float object and returns a number that is the absolute value of the method object.
Syntax
%number = float:Absolute
Syntax terms
%number | A variable to receive the numeric result of the Absolute method. |
---|---|
float | A Float value. |
Usage notes
- The Absolute function is available as of Sirius Mods Version 7.3
Examples
- The following statement places into %y the absolute value of the number in %x:
%y = %x:absolute
- The following statement returns 6.4 to %y:
%y = -6.4:absolute