subtract: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Applied Template:MacroFunction)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:


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


|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
     [r: subtract(10, 2, 4)]
     [r: subtract(10, 2, 4)]
     [r: subtract(9, 10, 3)]
     [r: subtract(9, 10, 3)]
</source>
</syntaxhighlight>
Returns  
Returns  
     4
     4

Latest revision as of 17:30, 14 March 2023

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