COMTRAN Reconstruction

F28-8043 · June 1960

Page 5

PDF page 11 of 124. Download the scanned PDF

The page as scanned

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

The text read off it

[page 5]

The sentence illustrates a conditional expression involving a simple relation between two quantities. If the QUANTITY.ON.HAND is less than the MINIMUM (in other words, the reorder point), the action specified following THEN is carried out. If QUANTITY.ON.HAND is not less than the MINIMUM, the action following THEN is not carried out.

Figure 2 shows in schematic form the structure of this sentence.

Flowchart: IF ... branches Yes to THEN ... which continues to the main line; No branches around to rejoin after THEN Figure 2. Schematic structure of an IF...THEN sentence (page 5).

The IF...THEN construction is one of the most important features of the Commercial Translator language. The conditional clause, which is introduced by the word IF and concluded by THEN, in effect asks a question to which the answer must be yes or no. We shall speak of each relation involved in a conditional expression as being true or false, or satisfied or not satisfied. This example uses the IS LESS THAN relation. The allowable relations, and the Commercial Translator words which may be used to express them, are shown in Figure 3.

Long Form Short Form
IS EQUAL TO =
IS NOT EQUAL TO NOT =
IS GREATER THAN GT
IS NOT GREATER THAN NOT GT
IS LESS THAN LT
IS NOT LESS THAN NOT LT

Figure 3. Relations: long form and short form (page 5).

Example 2 also shows a different command, MOVE...TO. The action called for is the copying of information within storage. The information named ORDER.QUANTITY is to be copied and called PURCHASE.AMOUNT.

It is probably apparent by now that certain words have special meanings in the Commercial Translator language: in the present example, the words IF, THEN, MOVE, TO and the phrase IS LESS THAN all have special meaning, and confusion would result if we tried to interpret these words in any other way. Such words are a fixed part of the language. A complete list of the Commercial Translator words appears in Appendix 2 at the end of the manual. Incidentally, the inference one might draw from the statement above is correct: a Commercial Translator program consists of just two kinds of words: fixed words, and names which the programmer selects.