- Unlike the spagetti flowchart above, the "structured"
logic flow is exclusively top-down, or left to right,
exactly mirroring the format of modern program code.
- The left most vertical line represents the top level algorithm of the main program.
- Each indention
mirrors
the indention of code within selection constructs and looping
constructs (in all structured programming languages and OOSD languages).
- There are only
two kinds of control structures, selection (represented with
diamonds) and iterations (represented by pentagons, or hexagons).
- Note that the particular kind of control
structure can be
left unspecified (blank diamonds or pentagons); this is a
particular
advantage of SACs over pseudocode, where everything is text.
- Note that the "REPEAT UNTIL" control structures
are equivalent
to the do while constructs of C, C++, Java, etc., i.e. they are looping
constructs with the condition for repetition at the end of the loop
body.
- Modularization
is explicitly represented by the procedure invocations in the upper SAC
which call PROCEDURE 1 and PROCEDURE 2. (It is assumed that these
are
"procedures", rather than functions, because it is unclear, in the
spagetti flowchart, wheter a value is returned (as done by functions)
or parameter values are passed back (as done by procedures), the latter
being the most general technique.
|
|