From WikiChip
Difference between revisions of "mirc/commands/break"
< mirc‎ | commands

(Created page with "The '''/break command''' terminates the execution of the nearest enclosing loop in which it appears. == Synopsis == /break == Switches == None == Parameters == None == Ex...")
 
m (Bot: de-linking old mIRC menu)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{mirc title|/break Command}}
 
The '''/break command''' terminates the execution of the nearest enclosing loop in which it appears.
 
The '''/break command''' terminates the execution of the nearest enclosing loop in which it appears.
  
Line 42: Line 43:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v5.7
+
{{mIRC compatibility|5.7}}
 
 
Added On: 02/02/2000
 
 
 
<small>Note: Individual switches were not taken into consideration.</small>
 
  
 
== See also ==
 
== See also ==
 
* [[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]]
* [[/continue command - mIRC|/continue]]
+
* {{mIRC|/continue}}
* [[/goto command - mIRC|/goto]]
+
* {{mIRC|/goto}}
* [[/halt command - mIRC|/halt]]
+
* {{mIRC|/halt}}
* [[/if command - mIRC|/if]]
+
* {{mIRC|/if}}
* [[/return command - mIRC|/return]]
+
* {{mIRC|/return}}
* [[/while command - mIRC|/while]]
+
* {{mIRC|/while}}
 +
{{mIRC command list}}
  
[[Category:mIRC commands]]
+
[[Category:mIRC commands|break command - mIRC]]

Latest revision as of 19:09, 15 June 2017

The /break command terminates the execution of the nearest enclosing loop in which it appears.

Synopsis[edit]

/break

Switches[edit]

None

Parameters[edit]

None

Example[edit]

/*
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[edit]

Added: mIRC v5.7
Added on: 02 Feb 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]

[Expand]
v · d · e mIRC commands list