Statements
A function (method, operator, property) body contains some statements that are used to interrupt the sequential execution of a program. Some of them contain blocks which also have nested statements.
There are several types of statements, as follows:
Conditional statements
| if-elif-else | Conditional statement. |
| switch | Case statement. |
Loop statements
| while-do | Simple loop statement. |
| do-while | Simple loop statement, evaluated at the bottom. |
| for | Loop statement that provides initialization and increment clauses. |
| fornum | Loop statement that executes a finite number of iterations and has autoincrement. |
| foreach | Loop used for enumerating elements. |
Instructions of unconditional transfer of control
| return | Function termination. |
| break | Loop termination. |
| continue | Immediate transfer of control to the next loop iteration. |
| label | Label definition. |
| goto | Unconditional transfer of control to a label. |
Other statements
| with | Short fields management. |