Project

General

Profile

Dec » History » Version 4

Per Amundsen, 11/05/2019 05:59 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 4 Per Amundsen
_See also [[/inc]], [[/set]], [[/var]]._
8
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 3 Per Amundsen
-B - Performs a $calcint calculation instead of regular $calc when arithmetic operators are used. (AdiIRC only)
17 1 Per Amundsen
18
*Parameters*
19
20
<%var> - The variable to decrease, either global or local.
21
[value] - Value to decrease by, if no value is defined, value is 1.
22
23
*Example*
24
25
<pre>
26
alias example {
27 2 Per Amundsen
  ;Create a local variable and set it to 10.
28 1 Per Amundsen
  var %x 10
29
30 2 Per Amundsen
  ;Decrease %x by 5.
31 1 Per Amundsen
  /dec %x 5
32
33 2 Per Amundsen
  ;Print out %x's content.
34 1 Per Amundsen
  echo -a %x
35
}
36
</pre>