|
ExitFor | ||||
ExitFor <.LoopCounter.> | ||||
Parameters: <.LoopCounter.> = The For/Next loop counter to break out of |
||||
Returns: NONE | ||||
ExitFor will force PlayBASIC to break out of the current For-Next loop that is being executed. It can also be used to break out a nested for-next statement, by using the 'loop-counter' of the for-next you wish to exit FACTS: * Only works within For-Next loops. * When an ExitFor command is executed, PlayBASIC will continue the program code following the Next statement. Mini Tutorial #1: Breaking free of For-Next when a condition is met.
This example would output.
Mini Tutorial #2: Breaking free of Nested For-Next when a condition is met.
This example would output.
|
Related Info: | Continue | Do | Exit | For | Goto | Next | Repeat | While : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |