Absolute (Float function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Test syntaxTable with intrinsic method)
m (match syntax diagram to revised template; fix tags.)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This [[Intrinsic classes|intrinsic]] function operates on a Float object and returns a number
{{Template:Float:Absolute subtitle}}
that is the absolute value of the method object.
The Absolute function is available as of version 7.3 of the Sirius Mods.


===Absolute syntax===
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.
    %abs = number:Absolute
 
====Syntax terms====
==Syntax==
{{Template:Float:Absolute syntax}}
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%abs</th><td>A variable to receive the numeric result of the Absolute 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 Float value.</td></tr>
<tr><th>float</th><td>A <var>Float</var> value.</td></tr>
</table>
</table>


===Examples===
==Usage notes==
The following statement places into %y the absolute value of the number in %x:
<ul><li>The <var>Absolute</var> function is available as of <var class="product">[[Sirius Mods]]</var> Version 7.3</ul>
    %y = %x:absolute
The following statement returns 6.4 to %y:
    %y = -6.4:absolute
 
===See also===
[[List of intrinsic Float methods]]
 
 
[[Category:Intrinsic Float methods|Absolute function]]
[[Category:Intrinsic methods]]


==Examples==
<ol><li>The following statement places into %y the absolute value of the number in %x:
<p class="code">%y = %x:absolute
</p>
<li>The following statement returns 6.4 to %y:
<p class="code">%y = -6.4:absolute
</p></ol>


<!--
==See also==
<section begin=dpl_desc />
{{Template:Float:Absolute footer}}
Absolute 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