SWAP VALUES: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
MikeO (talk | contribs)
No edit summary
MikeO (talk | contribs)
No edit summary
Line 12: Line 12:
:h3 = 7
:h3 = 7
:SWAP_VALUES h4, h3
:SWAP_VALUES h4, h3
:
:(h4 will now be set to 7 and h3 will be set to 3)


[[Category:Miscellaneous]]
[[Category:Miscellaneous]]

Revision as of 21:46, 13 August 2010

Up

Command

SWAP_VALUES <variable 1>, <variable 2>


Swap the values of 2 different variables.

Parameters

<variable 1>
Initial variable to swap with the second
<variable 2>
Second variable to swap with the first

Example

h4 = 3
h3 = 7
SWAP_VALUES h4, h3
(h4 will now be set to 7 and h3 will be set to 3)