Statements are parts of a program that alter its state, e. g. by changing a variable’s value.
classification
editOne may distinguish between simple and structured statements.
Elementary statements are those, which can not be broken down into smaller pieces – “sub-statements”. These are
- assignments,
- procedure calls,
raisecontrol transfer, andgotojumps.
Complex statements are
- compound statements (also called sequence) delimited by
beginandend, - inline assembler blocks delimited by
asmandend, - branches, and
- loops.
remarks
editIn contrast to statements, instructions are the building blocks in low-level assembly language.
Empty statements are not statements in a formal sense, since they merely exist to satisfy syntax requirements in a non-superfluous manner.