The text read off it
[page 4]
This is the equivalent, in Commercial Translator language, of the following procedure statement:
Multiply UNIT.PRICE by QUANTITY to get the TOTAL.PRICE.
In the example SET is a word which has a specific meaning in the Commercial Translator language; namely, it is a command to carry out the arithmetic procedure specified by the rest of the sentence. SET simply states that the calculation following the equal sign is to be performed.
The asterisk (*) in this example is used to indicate multiplication, instead of an X or a centered dot, to avoid possible confusion. For the same reason we use the slash (/) to indicate division and a double asterisk (**) to indicate taking the power of a number (exponentiation). The names of the operations, together with the acceptable symbols which are used in writing arithmetic expressions, are shown in Chapter 2 on page 21.
As can be seen from the example, a Commercial Translator sentence is very similar to an ordinary English statement in construction and format. Actually, the parallel extends to some aspects of punctuation. A Commercial Translator sentence always ends in a period. Data is referred to by name, such as TOTAL.PRICE. The major exception is that names consisting of more than one English word must be constructed with "imbedded" periods since in the Commercial Translator language a space always means a new name.
A name may be formed by any combination of the 26 letters of the English alphabet and the 10 digits, as long as it begins with a letter. The imbedded period may be used freely, except that it may not be the first or last character. A valid name can be of any length up to thirty characters.
There are, of course, differences between the Commercial Translator language and ordinary English construction. There is a standard format which must be observed. In the Commercial Translator language there is also a greater need for preciseness; for instance, TOTAL.PRICE must always be spelled in exactly the same way. This implies that we don't have the same semantic flexibility as in normal English. A particular name must be used to mean just one thing in a given program.
Although this example, which is used to illustrate the simplest ideas about the Commercial Translator language, is based on a price calculation, it might have been based on computations from many different fields. It might just as well have dealt with payroll, or inventory control, or insurance, or mathematical work in engineering.
Example 2
For a second example, consider a part of an inventory calculation. One sentence of the Commercial Translator procedure for determining whether or not to place an order might be:
Coding-form facsimile: Example 2 procedure statement (page 4).
SERIAL PROCEDURE NAME TEXT
01 REORDER.ROUTINE. IF QUANTITY.ON.HAND IS
02 LESS THAN MINIMUM THEN MOVE
03 ORDER.QUANTITY TO PURCHASE.AMOUNT.
The first word, REORDER.ROUTINE, is called a procedure-name. This is indicated by the fact that it begins in the procedure-name area of the programming form and is followed by a period. A procedure-name provides a way of referring to the sentence which follows.