Dec » History » Version 6
Per Amundsen, 11/03/2020 06:18 AM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | 3 | Per Amundsen | */dec [-cesuNzB] <%var> [value]* |
| 4 | 1 | Per Amundsen | |
| 5 | This decreases the value of %var by value. |
||
| 6 | |||
| 7 | 6 | Per Amundsen | _See also [[/var]], [[/set]], [[/unset]], [[/inc]], [[$var]]._ |
| 8 | 4 | Per Amundsen | |
| 9 | 1 | Per Amundsen | *Switches* |
| 10 | |||
| 11 | -c - Decrease %var once per second. |
||
| 12 | -e - Unset the variable when AdiIRC exists. |
||
| 13 | -s - Echo the new value to current window. |
||
| 14 | -uN - Decrease %var once and unset the variable after N seconds. |
||
| 15 | -z - Decreases %var until it reaches zero and then unset it. |
||
| 16 | |||
| 17 | *Parameters* |
||
| 18 | |||
| 19 | <%var> - The variable to decrease, either global or local. |
||
| 20 | [value] - Value to decrease by, if no value is defined, value is 1. |
||
| 21 | |||
| 22 | *Example* |
||
| 23 | |||
| 24 | <pre> |
||
| 25 | alias example { |
||
| 26 | 2 | Per Amundsen | ;Create a local variable and set it to 10. |
| 27 | 1 | Per Amundsen | var %x 10 |
| 28 | |||
| 29 | 2 | Per Amundsen | ;Decrease %x by 5. |
| 30 | 1 | Per Amundsen | /dec %x 5 |
| 31 | |||
| 32 | 2 | Per Amundsen | ;Print out %x's content. |
| 33 | 1 | Per Amundsen | echo -a %x |
| 34 | } |
||
| 35 | </pre> |