Arbortext Command Language > Commands > break
  
break
break
Immediately exits the innermost enclosing while or for loop or case block of a switch statement.
Examples
break
# The following alias only works in ascii files
alias goto_line {
caret first,first;
caret 0,+1;
if ($currentline == 2) {caret first,first;}
$lnr = $1;
$n = 1;
while ($n < $lnr) {
caret 0,'(^$)|(^.)' -nows -e;
if ($status != 0) {
execute message "File only has $n lines.";
break;
}
$n++;
}
unsetvar n lnr
}
Related Topics
continue command
for command
switch command
while command