Dec » History » Version 7
Per Amundsen, 02/16/2023 11:36 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 | 7 | Per Amundsen | table(ktable). |
| 12 | |*Switch*|*Description*| |
||
| 13 | | -c | Decrease %var once per second. | |
||
| 14 | | -e | Unset the variable when AdiIRC exists. | |
||
| 15 | | -s | Echo the new value to current window. | |
||
| 16 | | -uN | Decrease %var once and unset the variable after N seconds. | |
||
| 17 | | -z | Decreases %var until it reaches zero and then unset it. | |
||
| 18 | 1 | Per Amundsen | |
| 19 | *Parameters* |
||
| 20 | |||
| 21 | 7 | Per Amundsen | table(ktable). |
| 22 | |*Parameter*|*Description*| |
||
| 23 | | <%var> | The variable to decrease, either global or local. | |
||
| 24 | | [value] | Value to decrease by, if no value is defined, value is 1. | |
||
| 25 | 1 | Per Amundsen | |
| 26 | *Example* |
||
| 27 | |||
| 28 | <pre> |
||
| 29 | alias example { |
||
| 30 | 2 | Per Amundsen | ;Create a local variable and set it to 10. |
| 31 | 1 | Per Amundsen | var %x 10 |
| 32 | |||
| 33 | 2 | Per Amundsen | ;Decrease %x by 5. |
| 34 | 1 | Per Amundsen | /dec %x 5 |
| 35 | |||
| 36 | 2 | Per Amundsen | ;Print out %x's content. |
| 37 | 1 | Per Amundsen | echo -a %x |
| 38 | } |
||
| 39 | </pre> |