Dec: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 21: | Line 21: | ||
== See Also == | == See Also == | ||
* | * [[inc|/inc]] to increase a variable. | ||
* | * [[While_loops|While loops]] to learn more about them. | ||
[[Category:Variables]] | [[Category:Variables]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
Latest revision as of 07:51, 2 July 2007
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
- /inc to increase a variable.
- While loops to learn more about them.