Reading a decision diamond
Every diamond has (usually) two exits: yes and no. Both branches must eventually rejoin or end, otherwise the diagram never finishes.
{ score >= 60? }
|\n yes no
| \
v \
[ Pass ] [ Fail ]
\ /
\ /
[ End ]
A flowchart with a branch that leads nowhere is a bug waiting to happen.
Sequences, choices, loops
Three control structures appear in every flowchart:
- **Sequence*: steps in a straight line.
- **Choice*: the diamond that splits the path.
- **Loop*: an arrow that circles back to repeat steps.
[ Do task ]
|
v
{ Finished? }
|\n no (back up to the task)
yes
v
[ End ]
Loops are how you avoid drawing the same steps over and over.