This chapter contains miscellaneous notes which, may be of interest to users of the compiler.
Numerical values of real and integer quantities are represented in Atlas by 48 bit numbers, having 40 bits of mantissa x (including sign bit) and 8 bits of octal exponent y (including sign bit). The value represented is x.8y.
Real values are represented by standardised Atlas floating point numbers, that is, such that x = 0, 1/8≤x <1 or -1≤x<-1/8. Standardised floating point zero is taken as x = 0, y = -128. The range of real values available is approximately 10-116 to 10113, with an accuracy of about 11 decimal places. Arithmetic on real quantities is performed by standardising rounding accumulator instructions. The arithmetic is performed in the accumulator over 78 digits, the result being standardised and then rounded by truncating the least significant 39 digits, forcing the least significant remaining digit to a 1 if the truncated part was non-zero, and leaving it as it was otherwise.
Integer values are represented by Atlas fixed point numbers, in which the exponent is always 12. The binary point is regarded as being between the 4th and 3rd least significant digits. The range of integer values available is -812 to 812-1 inclusive or approximately -1010 to 1010. Arithmetic on integer quantities is performed by non-standardising instructions.
The compiler restricts the maximum depth of textual nesting in an Algol program: the limit is approximately 60 textual levels. Any block created within a block or procedure is considered to be at a textual level one lower than that of the block or procedure within which it is enclosed; in this context a procedure declaration may be regarded as being at a textual level one lower than that of the block or procedure in which it appears.
The limit on the total number of blocks and procedure declarations in any one program is approximately 1000.
The limit on the size of an Algol program is normally about 1600 lines. Larger programs (up to 3200 lines) can be run by making use of the magnetic tape backing scheme. This is done by allocating the number 126 to a magnetic tape in the job description; if a tape has that number allocated to it, the scheme will come into play. The scheme is not recommended save when absolutely necessary.
The efficiency of a compiled program handling array elements is enormously increased when the subscript expressions consist either of integer variables, integer constants or combinations of those by addition and subtraction only.
As mentioned in section 2.2.1, there is normally no check that the values of subscript expressions are within range. Such a check can be incorporated into the compiled program by writing the phrase
COMPILE ARRAY BOUND CHECK;
at the head of the program. All references to subscripted variables in the program are then checked to ensure that they are within the declared bounds.
If the array bounds are exceeded the program is monitored on
ARRAY BOUND EXCEEDED
and terminated in the usual way, as described in section 3.2.
Use of this facility causes extra orders to be compiled to carry out the array bound check, so it is recommended that the check be removed on production work.
If the phrase
OMIT COMPILER MONITORING;
is written at the head of an Algol program, all printing between the name and date of the compiler and PROGRAM FAULTY or PROGRAM ENTERED will be suppressed. Newlines will still be output. This facility is primarily for results which are to be sent over a data link, but can of course be used with any production run.
A processor has been written to enable the compiler to accept programs and data in other dialects of Algol.
The processor allows any combination of one of several input media with one of several sets of permanent procedures. At present available dialects are:
I.C.T. 7-hole paper tape Elliott 5-hole paper tape Elliott 8-hole paper tape KDF9 8-hole paper tape Cards (ALCOR and space dependent)
I.C.T. Elliott KDF9 Graph (for the Atlas Computer Laboratory graph plotter)
Full details are in Algol Paper No. 7 'Atlas Algol processor for non-standard Algol programs', published by the Atlas Computer Laboratory of the Science Research Council.
With the present compiler, permanent material and compiled program are in locations from *0, locations from *1 are used for program working space, and constants are compiled into locations from *14.
The compiled program uses B-lines B1 to Bn, where n is the maximum depth of textual nesting (see section 6.2) in the program and B69 and above, so B(n+1) to B68 are available for use in code procedures.