Please enable JavaScript.
Coggle requires JavaScript to display documents.
Control Flow - Coggle Diagram
Control Flow
Selection Statements
Two-Way Selection
N-Way Selection
Single-Way Selection
Nesting Selector Issue Fix
Providing a syntactic form
Selection Closure
Providing a rule (static semantics)
Design Issues
What is the form and type of the expression that controls the selection?
Is the entire construct encapsulated in a syntactic structure?
Explicit Sequence Control
Break
Continue
Label
Goto
Statement level Seqence Control
Alternation
Iteration
Compostition
Semantics
If a match is found control transfers to the statement attached to the matched constant_list
Commonly implemented using a jump table
The expression is evaluated and the value is compared with the constants in the constant lists
Iteration Statement
Causes a statement or a collection of statements to be executed zero or more times
Design Issues
Where should the control mechanism appear in the loop?
How is the iteration controlled?
Examples
Logically Controlled Loops
User-Located Loop Control Mechanism
Counter-controlled loops
Iteration based on data structures
Simple Repetition
User-Defined Iteration Control
Compound Statements
allow collection of statements to be abstracted into a single statement.
Python blocks are identified by
indentation
MySQL stored procedure
A Sequence of statements inside {....}
Design Issues
Multiple Entry Points
Multiple Exits
What is Control Flow?
refers to the order in which statements of an imperative or declarative program are executed or evaluated.
Among Program Units
Among Statements
Within Expressions
What are Control Structures?
A control statement and a collection of statements whose execution it controls.
What is Control Statement?
Basic mechanisms for controlling the execution of individual statements within a program. Initial control statements reflected underlying architecture.