CS 3304: Comparative Languages
Control Structures
[
Course Documents
] : [
Control Structures
]
Course Documents
Next
Keyword Index
Control Structures
Handout:
PDF File
(15pp., 638K)
Outline
Levels of Control Flow
Evolution of Control Structures
Control Structures
Compound Statements
Selection Statements
Single-Way Selection
Two-Way Selection
Nested Selectors
Disallowing Direct Nesting
Closing Reserved Words
Multiple Selection Constructs
Early Multiple Selectors:
Modern Multiple Selectors
Case: Pascal Design Choices
C/C++ Switch
Case: Ada Design Choices
Multi-Way If Statements
Iterative Statements
Counter-Controlled Loops
FORTRAN DO Loops
FORTRAN 90's Other DO
ALGOL 60 For Loop
ALGOL 60 For Design Choices
Pascal For Loop
Ada For Loop
C For Loop
C For Loop Design Choices
C++ & Java For Loops
Logically-Controlled Loops
Logic Loops: Examples
User-Located Loop Controls
User-Located Controls: Ada
User-Loc. Controls: More Examples
Iteration Based on Data Structures
Unconditional Branching (GOTO)
Variables as labels: PL/I
Restrictions on Pascal's Gotos
Guarded Commands (Dijkstra, 1975)
Guarded Selection
Guarded Iteration
Choice of Control Statements