Jackson structured programming: Difference between revisions

Content deleted Content added
m Disambiguated: JSDJackson system development
m Clarified the naming of elements in a diagram, and presenting the 'look-down' rule.
Line 81:
<center>[[Image:Element Jackson.png|A box labeled 'A']]<br>An operation</center>
 
A sequence of operations is represented by boxes connected with lines. In the example below, operation A consistsis ofa thesequence sequenceconsisting of operations B, C and D.
 
<center>[[Image:JSP Sequence.png|A box labeled 'A' connected to three boxes below it labeled 'B', 'C' and 'D']]<br>A sequence</center>
 
An iteration is again represented with joined boxes. In addition the iterated operation has a star in the top right corner of its box. In the example below, operation A consistsis ofan aniteration iteration of zero or more invocations of operation B.
 
<center>[[Image:JSP Iteration.png|A box labeled 'A' connected to a box labeled 'B' below it with a star in the top right corner]]<br>An iteration</center>
 
Selection is similar to a sequence, but with a circle drawn in the top right hand corner of each optional operation. In the example, operation A consistsis a selection of one and only one of operations B, C or D.
 
<center>[[Image:JSP Selection.png|A box labeled 'A' connected to three boxes below it labeled 'B', 'C' and 'D' each with a circle in the top right hand corner]]<br>A selection</center>Note that it in the above diagrams, it is element A that is the sequence or iteration, not the elements B, C or D (which in the above diagrams are all elementary). Jackson gives the 'Look-down rule' to determine what an element is, i.e. look at the elements below an element to find out what it is.
 
==A worked example==