Absolute (Float function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax diagram to revised template; fix tags.)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Template:Float:Absolute subtitle}}
{{Template:Float:Absolute subtitle}}


This [[Intrinsic classes|intrinsic]] function operates on a <var>Float</var> object and returns a number
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.
The <var>Absolute</var> function is available as of version 7.3 of the Sirius Mods.


==Syntax==
==Syntax==
Line 9: Line 7:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%abs</th><td>A variable to receive the numeric result of the <var>Absolute</var> method.</td></tr>
<tr><th>%number</th><td>A variable to receive the numeric result of the <var>Absolute</var> method.</td></tr>
<tr><th>number</th><td>A <var>Float</var> value.</td></tr>
<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:
    %y = %x:absolute
<p class="code">%y = %x:absolute
The following statement returns 6.4 to %y:
</p>
    %y = -6.4:absolute
<li>The following statement returns 6.4 to %y:
<p class="code">%y = -6.4:absolute
</p></ol>


==See also==
==See also==
[[List of intrinsic Float methods]]
{{Template:Float:Absolute footer}}
 
 
[[Category:Float methods|Absolute function]]
[[Category:Intrinsic methods]]
 
 
<!--
<section begin=dpl_desc />
<var>Absolute</var> value of number
<section end=dpl_desc />
-->

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

%numberA variable to receive the numeric result of the Absolute method.
floatA Float value.

Usage notes

  • The Absolute function is available as of Sirius Mods Version 7.3

Examples

  1. The following statement places into %y the absolute value of the number in %x:

    %y = %x:absolute

  2. The following statement returns 6.4 to %y:

    %y = -6.4:absolute

See also