Difference between revisions of "statement"
From Free Pascal wiki
Jump to navigationJump to search (review) |
m (substitute legacy syntaxhighlight syntax; rename page link from “Branches” to “Branch”, because there is already Branch/de (though no [English] Branch yet)) |
||
Line 10: | Line 10: | ||
* [[Becomes|assignments]], | * [[Becomes|assignments]], | ||
* [[Routine#invoking routines|procedure calls]], | * [[Routine#invoking routines|procedure calls]], | ||
− | * [[Raise|<syntaxhighlight lang="pascal" | + | * [[Raise|<syntaxhighlight lang="pascal" inline>raise</syntaxhighlight>]] control transfer, and |
− | * [[Goto|<syntaxhighlight lang="pascal" | + | * [[Goto|<syntaxhighlight lang="pascal" inline>goto</syntaxhighlight> jumps]]. |
Complex statements are | Complex statements are | ||
− | * compound statements (also called ''sequence'') delimited by [[Begin|<syntaxhighlight lang="pascal" | + | * compound statements (also called ''sequence'') delimited by [[Begin|<syntaxhighlight lang="pascal" inline>begin</syntaxhighlight>]] and [[End|<syntaxhighlight lang="pascal" inline>end</syntaxhighlight>]], |
− | * inline assembler blocks delimited by [[Asm|<syntaxhighlight lang="pascal" | + | * inline assembler blocks delimited by [[Asm|<syntaxhighlight lang="pascal" inline>asm</syntaxhighlight>]] and <syntaxhighlight lang="pascal" inline>end</syntaxhighlight>, |
− | * [[ | + | * [[Branch|branches]], and |
* [[Loops|loops]]. | * [[Loops|loops]]. | ||
Latest revision as of 07:49, 22 June 2020
│
English (en) │
suomi (fi) │
Statements are parts of a program that alter its state, e. g. by changing a variable’s value.
classification
One 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,
raise
control transfer, andgoto
jumps.
Complex statements are
- compound statements (also called sequence) delimited by
begin
andend
, - inline assembler blocks delimited by
asm
andend
, - branches, and
- loops.
remarks
In 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.