Section 3.11
Programming In QuickBASIC
3.11 Jackson Structure Diagrams
There are only three different 'building blocks' or program constructs which are
needed to write a structured program.
- Sequence
- Selection
- Iteration
GOTO
statements are not permitted in structured programming.
In addition, in modular programming, we break up large and complex programming
tasks into smaller tasks.
A way of representing the above is to use a JSD.
3.11.1 JSD Loop Representation
We represent the following code by:
DO WHILE a < b
    CALL MySub
    < statement block >
LOOP
The modules are written on the next level to show that they are repeated.
To represent a loop an asterisk is written in the top of the box and the
condition is written outside the box.
3.11.2 JSD Selection Representation
We represent:
IF an$ = "Y" OR an$ = "y" THEN
    < statement block 1 >
ELSE
    < statement block 2 >
END IF
by
Selection is represented by a small circle in each of the boxes representing
alternative paths.