|
Part 1: An Introduction to Structured
Techniques
by George Martin
Start ý Sequence
ý Selection ý Iteration/Looping
ý Testing ý Nassi-Schneiderman
Charts ý Sources and PDF
SELECTION
In order to understand the selection
structure (see Figure 3), you need to know what a condition is. Think
of it as a test. For example, is A less than 10? Or, is the A/D converter
complete? Those are conditions.
|
|
| Figure 3ýWhether the condition
is true or false determines how the selection structure for
the process will appear. |
If the condition is true, you execute
process E. If the condition is false, you execute D. Note that both
D and E do not need to be present, either can be missing. If both
are missing, then the test is not necessary.
Again, this structure has only one entry
and exit and is still completely testable.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |