Repository navigation
Continue
Home › Control Flow Statements › Continue
Control flow statement to continue next iteration of a loop
Continue {Do | For | While}Skips all code until the end clause of a loop structure, i.e. Do...Loop, For...Next, or a While...Wend block, then executes the limit condition check. In the case of a For...Next, the variable is incremented according to the Step specified.
Where there are multiple Do / For / While blocks nested, it will continue on the innermost block of that type, i.e. the last one entered. You can continue an earlier block of that type by giving the word multiple times, separated by commas. e.g. continue while, while
- Not available in the -lang qb dialect unless referenced with the alias
__Continue.
- New to FreeBASIC
Dim As Integer n
Print "Here are odd numbers between 0 and 10!"
Print
For n = 0 To 10
If ( n Mod 2 ) = 0 Then
Continue For
End If
Print n
Next n'' simple prime number finder
Print "Here are the prime numbers between 1 and 20!"
Print
Dim n As Integer, d As Integer
For n = 2 To 20
For d = 2 To Int(Sqr(n))
If ( n Mod d ) = 0 Then ' d divides n
Continue For, For ' n is not prime, so try next n
End If
Next d
Print n
Next nCategory: Control Flow Statements
Kind: keyword
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing