From WikiChip
Difference between revisions of "mirc/commands/break"
m (Bot: Adding a template) |
m (Bot: Fixing links) |
||
Line 51: | Line 51: | ||
* [[List of commands - mIRC|List of commands]] | * [[List of commands - mIRC|List of commands]] | ||
* [[List of identifiers - mIRC|List of identifiers]] | * [[List of identifiers - mIRC|List of identifiers]] | ||
− | * | + | * {{mIRC|/continue}} |
− | * | + | * {{mIRC|/goto}} |
− | * | + | * {{mIRC|/halt}} |
− | * | + | * {{mIRC|/if}} |
− | * | + | * {{mIRC|/return}} |
− | * | + | * {{mIRC|/while}} |
{{mIRC command list}} | {{mIRC command list}} | ||
[[Category:MIRC commands]] | [[Category:MIRC commands]] |
Revision as of 18:32, 5 July 2014
The /break command terminates the execution of the nearest enclosing loop in which it appears.
Synopsis
/break
Switches
None
Parameters
None
Example
/* Assume we have the following global variables: %foo = foobar %bar = example $isValue(testing) -> $false $isValue(foobar) -> %foo */ Alias isValue { ;Declare a counter variable and a returning variable var %count 1, %found $false ;Loop through all the variables while (%count <= $var(*)) { /* If we found one matching our argument, get the value and break out of the loop */ if ($var(*,$v1).value == $1-) { %found = $var(*,%count) ;break break } inc %count } ;return value return %found }
Compatibility
Added: mIRC v5.7
Added On: 02/02/2000
Note: Individual switches were not taken into consideration.
See also
mIRC commands list