![]() |
![]() |
for |
|
Syntax | |
|
|
Description | |
Performs <initialization> and then enters the following loop: 1) check <condition> , if it evaluates to false , terminate the loop (skip AFTER point 4). 2) execute <command> 3) execute <operation> (that must be a single l-value command!) 4) return to point 1 You can always jump out of the <command> by using break. [initialization] and [operation] can be empty. An empty <condition> (unlike other languages) is evaluated to false (treated as empty string); thus if you want an endless loop, you must use for(;1;) or (even better) while(1) that is a lot faster since there is no check for the [operation]. |
|
Examples | |
|