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.

How to run the programs 469

numbers with Label numbers. For example, Line 116 says that if

BETAB (which stands for {Jb as explained in Table 12.1-1) is less

than or equal to 0.9, go to Label100. Label100 occurs on Line 119.

The Label number is for the computer's internal use; the Line

number is purely for the convenience of the human user of the

program.

(c) The Main Program is always initialized by a Subroutine INIT ( =

INITialization) which reads in the input data. See, for example, Lines

36-40.

(d) The Main Program always ends by calling the Subroutine RESULT

to output the results. See, for example, Lines 71-76.

(e) All variables are explicitly declared. With reference to Line 32, for

example, readers familiar with FORTRAN [4] will realize that the

variables AS, ASDASH, etc. need not have been declared. However,

on balance it is much better to declare all of them.

(f) All the variables in the Main Program and the Subroutines are listed

alphabetically and explained in a table, which appears at the end of

the program (through it does not form part of the program). See, for

example, Table 12.1-1.

12.1(d)

How to run the programs

The programs are written to interact with the user. That is, they assume

that the input comes from the keyboard and the output goes to the screen.

Suppose the user has purchased (see Section 12.1(a) and Appendix 1) the

set of two floppy disks:

(1) The first disk (Disk I) contains all the programs listed in this chapter

in the form of 'source files'. A source-file name is the program name

plus' .FOR'. Thus, the program BMBRSR (of Fig. 12.1-2 and Section

12.4(a)) will be stored under the source-file name BMBRSR.FOR.

Similarly, any other program such as NMDDOE of Section 12.2(a)

will be stored under the source-file name NMDDOE.FOR.

(2) The second disk (Disk II) contains the so-called executable files of all

the source files of Disk I. Briefly, an executable file is the source file

stored in machine code, ready for execution. An executable-file name

is simply the program name plus '.EXE'. Thus the executable-file

name for the program BMBRSR will be BMBRSR.EXE, that for the

program NMDDOE will be NMDDOE.EXE and so on. That is:

Program name

BMBRSR

NMDDOE

etc.

Source-file name

BMBRSR.FOR

NMDDOE.FOR

Executable-file name

BMBRSR.EXE

NMDDOE.EXE

Suppose the user wants to run the program BMBRSR of Fig. 12.1-2 (and

Section 12.4(a)). The procedure is simple [2]:

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

Saved successfully!

Ooh no, something went wrong!