8.1 Using the Program Description Language and Flowcharts
Program description language (PDL) is free-format English-like text, which describes the flow of control and data in a program. PDL is not a programming language, but a collection of keywords that enable a programmer to describe the operation of a program in a stepwise and logical manner. In this section we will look at the basic PDL statements and their flowchart equivalents. The superiority of the PDL over flowcharts will become obvious when we have to develop medium to large programs.
8.1.1 BEGIN – END
Every PDL program description should start with a BEGIN and end with an END statement. The keywords in a PDL description should be highlighted to make the reading easier. The program statements should be indented and described between the PDL keywords. An example is shown in Figure 8.1, together with the equivalent flow diagram.
For normal sequencing, the program statements should be written in English text and describe the operations performed. An example is shown in Figure 8.2, together with the equivalent flowchart.
8.1.3 IF – THEN – ELSE – ENDIF
The IF, THEN, ELSE and ENDIF should be used to conditionally ...