|
DecLoop | |||
Do .. DecLoop | |||
Parameters: NONE | |||
Returns: NONE | |||
Do / DecLoop pairs are a conditional variation of the Do-Loop structure. DecLoop will decrease an integer or float variable until it's less than 0. So each loop the counter variable is decreased by one, until it reaches zero where execution falls through out of the loop. FACTS: * Do - DecLoop must be paired. * The Do must preceed the DecLoop statement. You'll get an error otherwise. * Do - DecLoop is a faster alternative to other conditional loop structures. But limited since it can only count down. * See Loops Tutorial. Mini Tutorial #1: Showing the use of a Do-DecLoop structure
This code will output:
Mini Tutorial #2: Emulating DecLoop This example show how you can emulate the Do-DecLoop structure.
|
Related Info: | Continue | Do | Exit | ExitDo | For | Loop | Loops | Repeat | While : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |