From WikiChip
Difference between revisions of "mirc/commands/dec"
m (Bot: Adding a template) |
(→Synopsis) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{mirc title|/dec Command}} |
The '''/dec command''' decreases the value of a variable by a given value. If no value is specified, mIRC will decrease the variable by one. The /dec command works with both positive and negative values alike. | The '''/dec command''' decreases the value of a variable by a given value. If no value is specified, mIRC will decrease the variable by one. The /dec command works with both positive and negative values alike. | ||
+ | |||
+ | '''Note''': /dec always keeps the unset time if there is one for the current variable, as though there was a -k switch from {{mIRC|/set}}, there's no switch to prevent this behavior and unset the time while setting the value. | ||
== Synopsis == | == Synopsis == | ||
− | /dec [- | + | /dec [-crszeuN] <%var> [value] |
== Switches == | == Switches == | ||
+ | * '''-s''' - Prints out the value of the variable | ||
+ | Global variables only: | ||
* '''-c''' - Decreases the variable once per second | * '''-c''' - Decreases the variable once per second | ||
− | * '''- | + | * '''-r''' - Decreases the variable once per second (same as -c) |
* '''-z''' - Decreases the variable every second until it reaches zero at which point the variable will get removed. | * '''-z''' - Decreases the variable every second until it reaches zero at which point the variable will get removed. | ||
* '''-e''' - Unsets the variable when mIRC exits | * '''-e''' - Unsets the variable when mIRC exits | ||
* '''-uN''' - Decrease the variable once and unsets the variable after N seconds. | * '''-uN''' - Decrease the variable once and unsets the variable after N seconds. | ||
+ | |||
== Parameters == | == Parameters == | ||
Line 39: | Line 44: | ||
{{mIRC command list}} | {{mIRC command list}} | ||
− | [[Category: | + | [[Category:mIRC commands|dec command - mIRC]] |
Latest revision as of 16:02, 17 February 2022
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /dec command decreases the value of a variable by a given value. If no value is specified, mIRC will decrease the variable by one. The /dec command works with both positive and negative values alike.
Note: /dec always keeps the unset time if there is one for the current variable, as though there was a -k switch from /set, there's no switch to prevent this behavior and unset the time while setting the value.
Synopsis[edit]
/dec [-crszeuN] <%var> [value]
Switches[edit]
- -s - Prints out the value of the variable
Global variables only:
- -c - Decreases the variable once per second
- -r - Decreases the variable once per second (same as -c)
- -z - Decreases the variable every second until it reaches zero at which point the variable will get removed.
- -e - Unsets the variable when mIRC exits
- -uN - Decrease the variable once and unsets the variable after N seconds.
Parameters[edit]
- %var - The variable's name
- [value] - Optional numeric value to decrease the variable by
Example[edit]
Alias Example { ;Create a local variable and set it to 10 var %x 10 ;Decrease %x by 5 dec %x 5 ;Print out %x's content echo -a %x }
Compatibility[edit]
Added: mIRC v4.0
Added on: 20 Mar 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC commands list