Dec » History » Version 3
Per Amundsen, 11/05/2019 05:58 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 | *Switches* |
||
8 | |||
9 | -c - Decrease %var once per second. |
||
10 | -e - Unset the variable when AdiIRC exists. |
||
11 | -s - Echo the new value to current window. |
||
12 | -uN - Decrease %var once and unset the variable after N seconds. |
||
13 | -z - Decreases %var until it reaches zero and then unset it. |
||
14 | 3 | Per Amundsen | -B - Performs a $calcint calculation instead of regular $calc when arithmetic operators are used. (AdiIRC only) |
15 | 1 | Per Amundsen | |
16 | *Parameters* |
||
17 | |||
18 | <%var> - The variable to decrease, either global or local. |
||
19 | [value] - Value to decrease by, if no value is defined, value is 1. |
||
20 | |||
21 | *Example* |
||
22 | |||
23 | <pre> |
||
24 | alias example { |
||
25 | 2 | Per Amundsen | ;Create a local variable and set it to 10. |
26 | 1 | Per Amundsen | var %x 10 |
27 | |||
28 | 2 | Per Amundsen | ;Decrease %x by 5. |
29 | 1 | Per Amundsen | /dec %x 5 |
30 | |||
31 | 2 | Per Amundsen | ;Print out %x's content. |
32 | 1 | Per Amundsen | echo -a %x |
33 | } |
||
34 | </pre> |