COMTRAN Reconstruction

F28-8043 · June 1960

Page 37

PDF page 43 of 124. Download the scanned PDF

The page as scanned

The scan of PDF page 43 of F28-8043
Select the scan to open it at full size.

The text read off it

[page 37]

Format of Procedure Statements

The clauses, sentences and sections that constitute the procedural portion of a Commercial Translator source program are written in "free-form" text on a programming form designed for that purpose. The form is shown on page 36; it has just four fields, which are as follows:

Ctl. and Serial (Col. 1-6)

Though separated on the form, the six spaces of "Ctl." and "Serial" are actually one field; the information entered in the first three spaces is the same for all lines on one page. This area of the form is used to indicate card sequence by means of numbers and/or alphabetic characters. The information will be sequence-checked by the processor. (Source programs are read by the processor in the form of a deck of punched cards or their equivalent on tape; each line of the programming form becomes one card in the source program deck.) The right-most space of this field, i.e., Column 6, is usually left blank or else made zero so that subsequent inserts can be numbered sequentially. For example, if the serials on a page are 010, 020, 030, etc., cards numbered 011, 012, . . . 019 can be inserted later between 010 and 020.

Procedure Name (Col. 7-12)

Columns 7-12 of the form are reserved for procedure-names, i.e., the names of sentences or sections. It is convenient to speak of this field as the name margin of the "Text" (see below) and to think of the procedure-names as "sticking out" into this margin.

The rules for procedure-names are as follows:

  1. The procedure header, *PROCEDURE, is a special name that must appear on a separate line preceding each procedural portion of a source program to distinguish it from data description or environment description.
  2. Procedure-names, like data-names, may contain up to thirty characters. Unlike data-names, however, they must be followed by a period and a blank.
  3. Procedure-names are written left-justified in the name margin and, if longer than six characters, extend into the "Text" area.

Text (Col. 13-72)

The procedure statements of the program are written in the "Text" area of the programming form. A number of examples in this chapter, as well as the sample program in Appendix 1, illustrate the manner in which the procedure is stated. The clauses, sentences and sections of procedure are written in free form, subject to the following rules:

  1. A named sentence follows its name. That is, it begins to the right of the name margin, on the same line as its name.
  2. An unnamed sentence must begin on a separate line and to the right of the name margin.
  3. Succeeding lines of a sentence must begin to the right of the name margin. (If desired, they may be indented to facilitate reading the text.)
  4. When a section of procedure is begun, only the BEGIN SECTION command may appear on the same line as the name of the section.
  5. To end a section, the command "END section.name" is written as a sentence, i.e., on a separate line.

Identification (Col. 73-80)

Columns 73-80 can be used to identify the program. The information entered here will be the same for all lines on the page. The use of this area of the form is optional.