COMTRAN Reconstruction

F28-8043 · June 1960

Page 73

PDF page 79 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 73]

A function has been defined in Chapter 2 as a result obtained by following a procedure. In the Commercial Translator system, the term is used only in connection with procedures specified in the BEGIN SECTION command. Any data-name specified in the GIVING clause of the BEGIN SECTION command is a function in this sense, and it must be identified as such in the data description. The function-name is identified by the type code FUNCT, and the function must be fully described in accordance with the provisions of this chapter. The parameters written in the USING clause of the BEGIN SECTION command must be identified in the data description by the type code PARAM, as explained immediately below. (See the discussion of functions in Chapter 2 and the BEGIN SECTION command in Chapter 3.)

PARAM

The type code PARAM is an abbreviation of the term "parameter." It is required, if appropriate, to show that the item of data being described is a parameter for use in a routine used to obtain a function. (See the discussion of functions in Chapter 2, the command BEGIN SECTION in Chapter 3, and the type code FUNCT above.)

Specifically, when the program contains a section introduced by a BEGIN SECTION command, each data-name listed in the USING clause of that command is a parameter, and it must be described as such in the data description.

REDEF

The code REDEF is used whenever it is necessary to redefine an area or an item of data that has previously been defined in some other way. This is usually necessary whenever a portion of the program "overlaps" another—i.e., when it calls for the use, on a "time-sharing" basis, of data or storage space which has previously been defined for some other purpose. It is also used in setting up tables in the system.

For example, it may be necessary to call existing data by a new set of names, or to reorganize it by altering the groupings and/or the subordinate level numbers. Frequently it is necessary to wipe out data to make room for other data. In any such case, a new data description is required for the new items or the new names. However, the name or names of the areas being redefined must first be listed, using the type code REDEF to show that the accompanying data description may also be used to refer to the same area. The REDEF entry must have the same level number as the entry being redefined. An illustration will be found later in this section, in the discussion of tables, on page 75.

Use of the REDEF code does not erase data in storage, unless an attempt is made to place two or more different constants in the same area; however, it does superimpose a new format upon the data already present. If the programmer wishes to change an item in storage, such as a value in a table, he may do so by using a MOVE instruction that specifies the new data and the position in storage where it is to be placed.

Redefinition does not cancel the previous definition. It merely makes it possible to refer to the same area by different names and for different uses. Once an area has been defined, all names associated with the definition may be used at any time, regardless of subsequent redefinitions.