The text read off it
[page 26]
Sentences may be assigned procedure-names, so that the programmer can make reference to them in other parts of the program. It will be seen that this provision makes it possible to carry out any sequence in the program whenever it is desired, without having to rewrite it each time. Suppose, for instance, that the last sample sentence given above, which begins IF OUT.OF.ZONE . . ., had been given the name DISTANCE.CHECK. Whenever the programmer wishes to make this check and take appropriate action, he can instruct the program to “transfer” to this sentence by writing either DO DISTANCE.CHECK or GO TO DISTANCE.CHECK. (This will be explained more fully in Chapter 3.) The actual method of assigning names will be discussed in Chapter 3 under the description of the columnar form used in writing procedure statements.
Sections
A section consists of one sentence, or a group of successive sentences, which has been given a name for reference purposes in accordance with the rules given below.
At first sight, it may appear that a Commercial Translator section corresponds closely to a paragraph of English. However, there are several distinctions. Sentences are not grouped into sections for the purpose of clarifying the logic or the structure of the program for the benefit of the system, whereas paragraphing in English does perform such a service for the reader. Sectioning, in the Commercial Translator, is used for the purpose of naming portions of procedure.
For example, suppose the programmer has written a sequence of sentences to calculate compound interest. Instead of having to write out this sequence each time the calculation is required, he can group the sentences into a section and give it a name by which it can be referred to elsewhere in the program. If this name were INTEREST.ROUTINE, for instance, he could write such a clause as DO INTEREST.ROUTINE at any point in the program, and this instruction would cause, first, a transfer to that routine and, second, a transfer back to the original point when the routine has been carried out. (Details will be found in the discussion of the DO command in Chapter 3.) Grouping of sentences into sections, then, is a device for identifying such a group for further reference.
The beginning of a section must be identified by a procedure-name, followed by a period. The name must then be followed by the words BEGIN SECTION, in accordance with the rules for using that verb, as given in Chapter 3. Following the last sentence in the routine, the programmer must write the word END, followed by the procedure-name used originally to identify the section.
Sections may be “nested,” that is, one or more sections may be contained within a larger section, but each such section must be wholly contained—it cannot overlap another section.
Where necessary, the names of sections can be used as parts of compound names.
Divisions
All Commercial Translator programs are composed of three divisions, the Procedure Description, the Data Description, and the Environment Description. The first of these contains the procedure statements of which the program is composed. The second provides the processor with information about the data to be used in the object program. The third is used to make certain technical connections between the program and the machine system on which it will be run; these details are dependent on the particular system and are therefore discussed in the publications covering the processors for the various systems.
