break
Allows you to exit the innermost FOR or WHILE loop immediately and stop execution of the loop.
When Adams View encounters a BREAK command inside a loop, it immediately exits the loop without executing the remaining commands for that iteration.
The BREAK command affects only the innermost FOR or WHILE loop.
Format:
BREAK
Example:
variable create variable_name=ip integer_value=0
while condition=(ip < 5)
variable modify variable_name=ip integer_value(eval(ip+1))
if condition=(eval(DB_EXISTS ("MAR"//ip)))
break
end
marker create marker_name=(eval("MAR"//ip)) &
location=(eval(ip-1)),0,0
end
variable delete variable_name=ip
In this example, Adams View creates markers, named MAR1, MAR2, MAR3, MAR4, and MAR5, unless a marker already exists with one of those names. As soon as it encounters an existing marker, Adams View exits the loop and does not create any more.