This section gives details of restrictions and. variations imposed by the Atlas 1 compiler on Algol 60 as defined by the revised report, and of the Atlas 1 interpretations of certain situations left undefined in the report.
Apart from the basic symbols, other characters provided by the Flexowriter code may be included in comment if desired; for instance the query mark "?" and composite characters containing not more than 3 different Flexowriter characters.
The character π(£) is synonymous with ; and so must not appear in comments.
A string may include, apart from basic symbols, other characters in the Flexowriter code. A composite character formed by means of backspace is assembled correctly for output if it does not contain more than 3 different Flexowriter characters. Erases and composite characters containing erase are ignored in strings, as elsewhere.
No check is normally made that the values of subscript expressions lie within the subscript bounds of the array (but see 6.2). A program which calls for an undefined subscripted variable may merely give numerically wrong answers or may fail catastrophically.
All the standard functions of (3.2.4) and (3.2.5) are available without explicit declarations. They may be thought of as declared in an outer block, enclosing the program.
The identifiers are not reserved for the standard functions since they may be used to denote other quantities, with disjoint scopes, if declared within a progra. (A similar treatment is accorded to the input and output procedures provided by the system.)
The functions sin and cos assume the actual parameter E to be expressed in radians. The function arctan returns a value in radians between -π/2 and π/2.
A call of the function sqrt (E) will cause the program to be monitored during execution if E<0; similarly with ln(E) if E ≤0 (see section 3.2.1).
A list of available standard functions and system procedures appears as Appendix 4.
No rules can. be given for the order of evaluation of the primaries of a simple arithmetic expression. The same is true of the Boolean primaries of a simple Boolean (3.4.3).
It is understood that effects may be induced by the evaluation of Boolean expressions in the if clauses of conditional arithmetic expressions, even though they have the value false. This remark applies also to conditional Boolean expressions (3.4.3) conditional designational expressions (3.5.3) and conditional statements (4.5.3.2).
The definition of the operator ÷ has been extended; it is defined for operands each of type real or integer. The result is of type integer, mathematically defined as follows:
a ÷ b = sign (a/b) × entier (abs (a/b))
The result of the operation of exponentiation is given by the following rules (i is of type integer; and a of type real):
The values of real quantities are represented in Atlas as standardised Atlas 1 48-bit floating point numbers. The evaluation of arithmetic expressions is done by standardising rounding instructions; for details of the operation of these see CS348A. See also section 6.1.
Integer labels are not allowed.
If the value of the subscript expression of a switch designator is out of range, the rule of (4.3.5) applies with certain reservations: see 2.3.1 below.
If in a go to statement the designational expression is a switch designator the value of the subscript expression of which is out of range, then the next statement obeyed will be the statement following the go to statement. However, the subscript expression will be completely evaluated so the go to statement may not be equivalent to a dummy statement as required in (4.3.5).
If the exit from a statement S controlled by a for clause is due to exhaustion of the for list, nothing can be assumed about the value of the controlled variable.
The behaviour of a program containing a go to statement leading into a for statement cannot be predicted.
Further rules concerning the correspondence between actual and formal parameters are as follows:
Apart from labels and with the exception of the identifiers of standard functions and input and output procedures provided by the system all identifiers of a program must be declared. No identifier may be declared more than once in any block head.
The declarator own is given the sense of Reformulation 23 of Algol bulletin 14, except that own arrays with dynamic (i.e. non-constant) bounds are not allowed.
Reformulation 23 of Algol bulletin 14 suggests the following expansion of (5.4). (The wording has been changed slightly; in particular, reference to own arrays with dynamic bounds has been deleted.)
Delete the first two sentences and add instead: "Declarations for simple variables and arrays may be marked with the additional declarator own.
The difference between own a$d non-own variables is the following: non-own variables are attached to the block in which they are local both with regard to the meaning of their identifiers and with regard to the existence of their values. Each entry into a block, whether recursive or not, will bring a new set of the non-own variables of that block into existence, the values of those Variables being initially undefined. On exit from a block all the non-own variables created at the corresponding entry are lost, with respect both to their identifiers and to their values. Own variables, on the other hand, are local only with respect to the accessibility of their identifiers. Where the existence of their values is concerned they behave more closely as though they were declared in the outermost block of the program. Thus every entry into a block, whether recursive or not, will make the same set of values of the own variables of that block accessible. On exit from a block the values of the own variables of the block are preserved, but remain inaccessible until re-entry is made to a place within the scope of the identifiers."
The representation of real and integer numbers is described in section 6.1.
An array declaration in which the value of an upper subscript bound is smaller than that of the corresponding lower bound will cause a compile time monitoring if the array is declared own, and a run time monitoring otherwise (see Chapter 3).
On finding within the body of a procedure B a call of a procedure Y which is a formal parameter of B, the compiler will search for a call of a procedure which is or would activate a call of B with an actual parameter X corresponding to Y. If no such call is found the program is faulted. (See section 3.1.2) (This restriction, which can fault a legal Algol program, may be removed shortly.)
In the procedure body of a type procedure an assignment of value to the procedure identifier must occur, else the program is faulted. (See section 3.1.2)
Specifications of all formal parameters of a procedure, including those called by name, must be supplied.