Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ PrefaceContentsNote on certain Supervisor features1. Presenting an Algol Program to Atlas2. Variations on Algol 603. Monitor printing and fault diagnosis4. Code procedures5. Input and Output6. Miscellaneous programming notes □ Appendices and indices □ A1. ICT 7-track punched tape codeA2. Hardware representationA3. Fault tableA4. Standard functions and system proceduresIndex to Supervisor and compiler printingsGeneral index
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureAtlas manualsAlgol :: ATLAS 1 COMPUTER ALGOL REFERENCE MANUAL
ACLLiteratureAtlas manualsAlgol :: ATLAS 1 COMPUTER ALGOL REFERENCE MANUAL
ACL ACD C&A INF CCD CISD Archives
Further reading

Preface
Contents
Note on certain Supervisor features
1. Presenting an Algol Program to Atlas
2. Variations on Algol 60
3. Monitor printing and fault diagnosis
4. Code procedures
5. Input and Output
6. Miscellaneous programming notes
Appendices and indices
A1. ICT 7-track punched tape code
A2. Hardware representation
A3. Fault table
A4. Standard functions and system procedures
Index to Supervisor and compiler printings
General index

2 Variations on and Interpretations of the Algol 60 Revised Report

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.

2.1 Basic symbols, identifiers, numbers and strings (2)

2.1.1 Comment conventions (2.3)

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.

2.1.2 Strings (2.6)

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.

2.2 Expressions (3)

2.2.1 Undefined subscripted variables (3.1.4.2)

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.

2.2.2 Standard functions (3.2.4 and 3.2.5)

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.

2.2.3 Evaluation of arithmetic expressions (3.3.3)

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).

2.2.4 The operator ÷ (3.3.4.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)) 
2.2.3 The operator exp (3.3.4.3)

The result of the operation of exponentiation is given by the following rules (i is of type integer; and a of type real):

a exp i
If i > 0, a×a×....×a (i times), of the same type as a.
If i = 0, 1, of the same type as a.
If i < 0, if a ≠ 0, (1/a) × (1/a) ×....× (1/a) (i times) of real type.
If i < 0, if a = 0, program monitored as a result of an attempt to divide by zero (see section 3.2.1).
a exp r
If a > 0, exp (r × ln(a)), of real type.
If a ≤ 0, program monitored as a result of an attempt to take the logarithm of a negative or zero number (see section 5.3.1)
2.2.6 Arithmetic of real quantities (3.3.6)

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.

2.2.7 Integer labels (3.5.1 and 3.5.5)

Integer labels are not allowed.

2.2.8 Undefined switoh designator (3.5.4)

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.

2.3 Statements (4)

2.3.1 go to an undefined switch designator (4.3.5)

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).

2.3.2 Exit from a for statement (4.6.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.

2.3.3 go to leading into a for statement (4.6.6)

The behaviour of a program containing a go to statement leading into a for statement cannot be predicted.

2.3.4 Procedure statements: restrictions (4.7.5)

Further rules concerning the correspondence between actual and formal parameters are as follows:

  1. When a formal parameter is specified as a procedure, all corresponding actual parameters must be procedures in the declarations of which corresponding formal parameters have the same specifier, and are called in the same way (by name or by value). If the formal parameter is further specified as a type procedure, an actual parameter must be a type procedure of the same type.
  2. When a formal parameter is specified as type real or integer and is called by name, any corresponding actual parameter must have the same type as the formal parameter if assignments are made within the procedure body to the parameter. If assignments are not made the actual parameter is regarded as an expression and provision is made for the appropriate transfer function from real to integer or integer to real to be invoked as necessary, If a formal parameter called by name is specified as of type Boolean or as an array of any type, the corresponding actual parameter must always be of the same type.

2.4 Declarations (5)

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.

2.4.1 Own variables

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."

2.4.2 Values of real and integer variables (5.1.3)

The representation of real and integer numbers is described in section 6.1.

2.4.3 Array declarations (5.2.4.3)

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).

2.4.4 Procedures as formal 'parameters (5.4)

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.)

2.4.3 Values of functions designators (5.4.4)

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)

2.4.6 Specification of formal parameters (5.4.5)

Specifications of all formal parameters of a procedure, including those called by name, must be supplied.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site