subtract: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Applied Template:MacroFunction)
Line 1: Line 1:
==Function subract==
{{MacroFunction
 
|name=subract
|description=
Subtracts the second number from the first number. Then will continue by subtracting the third number (if any from this result), the function continues subtracting until all number arguments are exhausted.
Subtracts the second number from the first number. Then will continue by subtracting the third number (if any from this result), the function continues subtracting until all number arguments are exhausted.


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: num = subtract(num, num, ...)]
[h: num = subtract(num, num, ...)]
</source>
</source>


 
|examples=
===Example===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
     [r: subtract(10, 2, 4)]
     [r: subtract(10, 2, 4)]
Line 17: Line 17:
     4
     4
     -4
     -4
}}
[[Category:Mathematical Function]]

Revision as of 05:26, 9 March 2009

subract() Function

Subtracts the second number from the first number. Then will continue by subtracting the third number (if any from this result), the function continues subtracting until all number arguments are exhausted.

Usage

[h: num = subtract(num, num, ...)]

Examples

    [r: subtract(10, 2, 4)]
    [r: subtract(9, 10, 3)]

Returns

   4
-4