Difference between revisions of "Dec"
From Scriptwiki
(added category) |
|||
Line 23: | Line 23: | ||
*To increase a variable, you can use [[inc]]. | *To increase a variable, you can use [[inc]]. | ||
*Read [[While_loops|While loops]] to learn more about them. | *Read [[While_loops|While loops]] to learn more about them. | ||
+ | |||
+ | [[Category:Variables]] |
Revision as of 21:53, 8 November 2005
This decreases the value of %var by value.
/dec [-cszuN] <%var> [value]
Options explained:
uN - decreases %var once and unsets it N seconds later. z - decreases %var until it reaches zero and then unsets it. s - displays action in status window c - decreases %var once per second.
If no value is given, default value is 1.
Example
This example shows how to use dec basically in a while-loop:
var %i = 10 while (%i) { echo -ag $chr(37) $+ i = %i dec %i }
See Also
- To increase a variable, you can use inc.
- Read While loops to learn more about them.