[Loop_Abort] aborts the [Loop] or [While] containers, exiting immediately and not executing any further repetitions of the loop.
The [Loop_Abort] method can be used to abort any looping container method including [Records].
Loop(Loop Count) => {
Loop_Abort
}
While(Conditional Expression) => {
Loop_Abort
}
Use the [Loop_Abort] method. The following example shows a [Loop] loop which performs a calculation until a negative value is found and [Loop_Abort] is called.
The variable result returns -1 at the end since (50-51) is less than 0.
Code
Loop(100) => {
var(Result = 50 - loop_count)
$Result < 0 ? loop_abort
}
$Result
Result
-1
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments