{{fbdoc item="title" value="WHILE"}}---- Control flow statement. {{fbdoc item="syntax"}}## Do **While** //condition// [//statement block//] Loop //or// Do [//statement block//] Loop **While** //condition// //or// **While** [//condition//] [//statement block//] **Wend** ## {{fbdoc item="desc"}} ##**While**## specifies that a loop block will continue if the ##//condition//## following it evaluates as true. This ##//condition//## is checked during each loop iteration. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/while.bas"}}%%(freebasic) Dim a As Integer a = 0 Do While a < 10 Print "hello" a = a + 1 Loop 'This will continue to print "hello" on the screen while the condition (a < 10) is met. %% {{fbdoc item="diff"}} - None {{fbdoc item="see"}} - ##[[KeyPgDoloop|Do...Loop]]## - ##[[KeyPgWhilewend|While...Wend]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}}