27.06.2021 Views

F. K. Kong MA, MSc, PhD, CEng, FICE, FIStructE, R. H. Evans CBE, DSc, D ès Sc, DTech, PhD, CEng, FICE, FIMechE, FIStructE (auth.)-Reinforced and Prestressed Concrete-Springer US (1987)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Program layout 457

the efforts to make them easier to translate into BASIC [3] or PASCAL if

necessary. Efforts have also been devoted to make it easier for the

programs to be amended by the reader to do slightly different jobs as

required.

To make the programs easy to read and easy to understand, each one is

written in modular form. The program layout has been designed to convey

two points quickly to the reader:

(a) The purpose of each program module;

(b) How it achieves that purpose.

The layout of each program is illustrated in Fig. 12.1-1.

Each program consists essentially of three blocks: (i), (ii) and (iii) as

shown in Fig. 12.1-1(a). Each program is followed by a table (Fig.

12.1-1(b)), which shows all the variables and their meanings. Block (i) in

Fig. 12.1-1 is the Header of the Main Program and corresponds to Lines

1-27 in the program listing in Fig. 12.1-2. The Header gives the following

information:

(a) The program name and what it stands for (Line 3);

(b) The purpose of the program (Lines 6-9);

(c) The reference (Lines 11-14).

The rest of the Header (Lines 18-25) states the authorship, the program

language and the operating systems of the microcomputers for which the

program has been written.

Bloclt (i)

Bloclt (ii)

Subroutines

(Listed in

alphabetical order)

Block (iii)

(a)

Table showing

all the variables

and their meanings

(b)

Fig. 12.1-1 Program layout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!