Statements - General
A statement in Pascal is an action that is self contained. It may
by a single action (i.e. blow_up_a_balloon) or a compound action
(i.e. begin
take_off_the_wheel_nuts;
take_off_the_tire;
replace_the_tire;
replace_the_wheel_nuts
end).
Pascal statements are SEPARATED BY semi-colons (;)
Compound Statements are enclosed in a begin...end pair (this acts
like a set of 'brackets' to distinguish parts of the compound action
from the surrounding code.
Wherever a statement is legal, a compound statement is legal also
(so long as a begin..end is in place)
Every 'commercial programming language' must allow:
- Sequence - tasks done in known (pre-determined) order
- Selection - ability to branch logically based on decisions
- Iteration - repeating things
Languages might also offer
- Procedures and Functions - modularization of tasks into
re-usable objects
- Recursion - code that calls itself