Help Center›FreeBASIC
Whilekeyword
Control flow statement.
Syntax
Do While condition
[statement block]
Loop
Do
[statement block]
Loop While condition
While [condition]
[statement block]
Description
While specifies that a loop block will continue if the condition following it evaluates as true. This condition is checked during each loop iteration.Remarks
Version
- Since fbc 1.20.0:
End Whileequivalent toWend
Differences from QB
- None, except for the
End Whilesyntax (equivalent toWend) specific to FreeBASIC.
See also
Example
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.
Reference
- Documented in KeyPgWhile.html