EndWhile
While <.comparison expression.> ... EndWhile
 
Parameters: NONE
Returns: NONE
 

     A While-EndWhile loop executes its constituent statement repeatedly, testing the expression before each iteration. As long as expression returns True, execution continues.



FACTS:


     * While-EndWhile must be paired.

     * The While must preceed the EndWhile statement. You'll get a syntax error otherwise.

     * You can exit a While-EndWhile loop anytime with the Exit or the ExitWhile statement.

     * Not sure about loops ? Make sure you read the Loops Tutorial then




Mini Tutorial:


      A simple While-EndWhile loop

  
; The Main loop
  Do
   ; Draw random dots while the mouse button is pressed
     While MouseButton()
        Dot Rnd(100)+100Rnd(100)+100
        Sync
     EndWhile
     Sync
  Loop
  



 
Related Info: Comparisons | Continue | Do | Exit | ExitWhile | For | If | Loops | Not | Repeat | While :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com