50 van Wijngaarden, et al.c) The phrase "the yield of S", where S is a scene whose elaborationis not explicitly prescribed, stands for "the yield obtained by initiating theelaboration of S and awaiting its completion".{Thus the sentence (3.2.2.c):"W is the yield of that unit:"(which also makes use of the abbreviation defined in b above) is to beinterpreted as meaning:"W is the yield obtained upon the completion of the elaboration.hereby initiated, of the scene composed of that unit and theenviron under discussion:" .}d) The phrase "the yields of S 1 . . . . . Sn" where S 1 ..... Sn are sceneswhose elaboration is not explicitly prescribed, stands for "the yieldsobtained by initiating the collateral elaboration {2.1.4.2.f} of S 1 ..... Sn andawaiting its completion {which implies the completion of the elaboration ofthem all}".If some or all of S 1 ..... S are described as being, in some environ,ncertain constituents of some construct, then their yields are to beconsidered as being taken in the textual order {1.1.3.2.i} of thoseconstituents within that construct.{Thus the sentence (3.3.2.b):"let V 1 ..... V be the {collateral} yields of the constituent units ofmC;"is to be interpreted as meaning:"let V 1 ..... V be the respective yields obtained upon themcompletion of the collateral elaboration, hereby initiated, of thescenes composed of the constituent units of C, considered in theirtextual order, together with the environ in which C was beingelaborated;" .}e) The phrase "if A is B", where A and B are hypernotions, stands for"if A is equivalent {2.1.1.2.a} to B".{Thus, in "Case C: 'CHOICE' is some 'choice using L;NITEI)'" (3.4.2.b).it matters not whether 'CtlOICE' happens to begin with 'choice using unionof' or with some "choice using Mti definition of union of'.}f) The phrase "the mode is A", where A is a hypernotion, stands for"the mode {is a class of 'MOlD's which} includes A".{This permits such shortened forms as "the mode is some 'structuredwith FIELI)S mode'", "the mode begins with 'union of'", and "the modeenvelops a 'FIEl.I)'": in general, a mode may be specified by quoting justone of the 'MOll)'s included in it.}g) The phrase "the value selected (generated) by the field-selector F"stands for "if F is a fieid-selector-with-TA(; {4.8.1.f}, then the value selected{2.1.3.3.a,e, 2.1.3.4.k} (generated {2.1.3.4.1}) by that 'TA(;'"2.2. The program2.2.1. SyntaxALGOL <strong>68</strong> Revised Reporta) program : strong void new closed clause{31a}.{See also 10.132.2.2. Semantics{"1 can explain all the poems that ever were invented -and a good many that haven't been invented just yet."Through the Looking-glass,Lewis Carroll.}a) The elaboration of a program is the elaboration of its strong-voidnew-closed-clausein an empty environ {2.I.l.t.c} termed the "primalenviron".{Although the purpose of this Report is to define the meaning of aparticular-program {10.t.t.g}, that meaning is established only by firstdefining the meaning of a program in which that particular-program isembedded (10.1.2).}{In this Report, the syntax says which sequences of symbols areterminal productions of 'program', and the semantics which actions areperformed by the computer when elaborating a program. Both syntax andsemantics are recursive. Though certain sequences of symbols may beterminal productions of "program' in more than one way (see alsol.l.3.2.f), this syntactic ambiguity does not lead to a semantic ambiguity.}b) In ALGOL <strong>68</strong>, a specific syntax for constructs is provided which,together with its recursive definition, makes it possible to describe and todistinguish between arbitrarily large production trees, to distinguishbetween arbitrarily many different" values of a given mode (except certainmodes like "boolean' and 'void') and to distinguish between arbitrarilymany modes, which allows arbitrarily many objects to exist within thecomputer and which allows the elaboration of a program to involve anarbitrarily large, not necessarily finite, number of actions. This is notmeant to imply that the notation of the objects in the computer is thatused in this Report nor that it has the same possibilities. It is not assumedthat these two notations are the same nor even that a one-to-onecorrespondence exists between them: in fact, the set of different notationsof objects of a given category may be finite. It is not assumed that thecomputer can handle arbitrary amounts of presented information. It is notassumed that the speed of the computer is sufficient to elaborate a givenprogram within a prescribed lapse of time, nor that the number of objectsand relationships that can be established is sufficient to elaborate it at all.c) A model of the hypothetical computer, using a physical machine, issaid to be an "implementation" of ALGOL <strong>68</strong> if it does not restrict the useof the language in other respects than those mentioned above.Furthermore, if a language A is defined whose particular-programs are51
52 van Wijngaarden, et al.also particular-programs of a language B, and if each such particularprogramfor which a meaning is defined in A has the same definedmeaning in B, then A is said to be a "sublanguage" of B, and B a"superlanguage" of A.{Thus a sublanguage of ALGOL <strong>68</strong> might be defined by omitting somepart of the syntax, by omitting some part of the standard-prelude, and/orby leaving undefined something which is defined in this Report, so as toenable more efficient solutions to certain classes of problem or to permitimplementation on smaller machines.Likewise, a superlanguage of ALGOL <strong>68</strong> might be defined by additionsto the syntax, semantics or standard-prelude, so as to improve efficiency(by allowing the user to provide additional information) or to permit thesolution of problems not readily amenable to ALGOL <strong>68</strong>.}A model is said to be an implementation of a sublanguage if it does notrestrict the use of the sublanguage in other respects than those mentionedabove.{See 9.3.c for the term "implementation of the reference language".}{A sequence of symbols which is not a particular-program but can beturned into one by deleting or inserting a certain number of symbols andnot a smaller number could be regarded as a particular-program with thatnumber of syntactical errors. Any particular-program that can be obtainedby deleting or inserting that number of symbols may be termed a"possibly intended" particular-program. Whether a particular-program orone of the possibly intended particular-programs has the effect its authorin fact intended it to have is a matter which falls outside this Report.}{In an implementation, the particular-program may be "compiled", i.e.,translated into an "object program" in the code of the physical machine.Under certain circumstances, it may be advantageous to compile parts ofthe particular-program independently, e.g., parts which are common toseveral particular-programs. If such a part contains applied-indicatorswhich identify defining-indicators not contained in that part, thencompilation into an efficient object program may be assured by precedingthe part by a sequence of declarations containing those definingindicators.}{The definition of specific sublanguages and also the specification ofactions not definable by any program (e.g., compilation or initiation of theelaboration) is not given in this Report. See, however, 9.2 for thesuggested use of pragmats to control such actions.}PART IIFundamental Constructions{This part presents the essential structure of programs:• the general rules for constructing them:ALGOL <strong>68</strong> Revised Report 53• the ways of defining indicators and their properties, at each new levelof construction;• the constructs available for programming primitive actions.}3~. Clauses{Clauses provide• a hierarchical structure for programs,• the introduction of new ranges of definitions,• serial or collateral composition, parallelism, choices and loops.}3.0.1. Syntaxa) *phrase : SOME unit{32d} ; NEST declaration of I)ECS{41a}.b) * SORT MODE expression : SORT MODE NEST UNIT{SA}.c) *statement : strong void NEST UNIT{5A}.d) *MOID constant : MOID NEST DEFIED identifier with TAG{48a,b} ;MOID NEST denoter{80a}.e) * MODE variable :reference to MODE NEST DEFIED identifier with TAG{48a,b}.f) * NEST range : SOID NEST serial clause defining LAYER{32a} ;SOID NEST chooser CHOICE STYLE clause{34b} ;SOlD NEST case part of choice using UNITED{34i} ;NEST STYLE repeating part with DEC{35e} ;NEST STYLE while do part{35f} ;PROCEDURE NEST routine text{541a,b}.{NEST-ranges arise in the definition of "identification" (7.2.2.b).}3.0.2. SemanticsA "nest" is a 'NEST'. The nest "of" a construct is the 'NEST" envelopedby the original of that construct, but not by any 'defining LAYER'contained in that original.{The nest of a construct carries a record of all the declarations formingthe environment in which that construct is to be interpreted.Those constructs which are contained in a range R, but not in anysmaller range contained within R, may be said to comprise a "reach". Allconstructs in a given reach have the same nest, which is that of theimmediately surrounding reach with the addition of one extra "LAYER'.The syntax ensures (3.2.1.b, 3.4.1.i,j,k, 3.5.1.e, 5.4.1.1.b) that each 'PROP'(4.8.1.E) or "property" in the extra 'LAYER' is matched by a defining.indicator (4.8.1.a) contained in a definition in that reach.}3.1. Closed clauses{Closed.clauses are usually used to construct units from serial-clausesas, e.g.,(real x; read (x); x) in(real x; read (x); x) + 3.14.}
- Page 2 and 3: van Wijngaarden, et al.1.1.4.2. Par
- Page 4: Acknowledgements{Habent sua fata li
- Page 8 and 9: 14 van Wijngaarden, et al.0.3.4. Mo
- Page 10 and 11: . . . . . . . 4 " ' 0 . . . . . . .
- Page 12 and 13: 22 van Wijngaarden, et al.• let P
- Page 14 and 15: 26 van Wijngaarden, et al.{Since so
- Page 16 and 17: 30 van Wijngaarden, et aLloperandfo
- Page 18 and 19: 34 van Wijngaarden, et al.j) WHETHE
- Page 20 and 21: 38 van Wijngaarden, et al.A protono
- Page 22 and 23: 42 van Wijngaarden, et al.d) If N i
- Page 24 and 25: 46 van Wijngaarden, et al.c) {There
- Page 28 and 29: 54 van Wijngaarden, et al.3.1.1. Sy
- Page 30 and 31: 58 van Wijngaarden, et al.where (RO
- Page 32 and 33: 62 van Wijngaarden, et al.1) SOlD N
- Page 34 and 35: 66 van Wijngaarden, et al.ALGOL 68
- Page 36 and 37: 70 van Wijngaarden, et el.For each
- Page 38 and 39: 74 van Wijngaarden, et al.If 'MODE"
- Page 40 and 41: 78 J van Wijngaarden, et al.C) SECO
- Page 42 and 43: 82 van Wijngaarden, et al.ALGOL 68
- Page 44 and 45: 86 van Wijngaarden. et al.ALGOL 68
- Page 46 and 47: 90 van Wijngaarden, et al.5.4.4.1.
- Page 48 and 49: 94van Wijngaarden, et al.ALGOL 68 R
- Page 50 and 51: 98 van Wijngaarden, et al.Assignati
- Page 52 and 53: 102 van Wijngaarden, et at.{A nest,
- Page 54 and 55: 106 van Wijngaarden, et al.'HEAD's
- Page 56 and 57: 110 van Wijngaarden, et al.ALGOL 68
- Page 58 and 59: 114van Wijngaarden, et al.ALGOL 68
- Page 60 and 61: 118 van Wijngaarden, et al.ALGOL 68
- Page 62 and 63: 122 van Wijngaarden, et al.style ii
- Page 64 and 65: 126 van Wijngaarden, et al.b) The c
- Page 66 and 67: 130van Wijngaarden, et al.ALGOL 68
- Page 68 and 69: 134van Wijngaarden, et al.ALGOL 68
- Page 70 and 71: 138d)e)f)g)h)i)J)k)1)m)n)van Wijnga
- Page 72 and 73: 142 van Wijngaarden, et al.physics
- Page 74 and 75: 146 van Wijngaarden, et al.gg) On s
- Page 76 and 77:
150van Wijngaarden, et al.ALGOL 68
- Page 78 and 79:
154/van Wijngaarden, et al.ALGOL 68
- Page 80 and 81:
158 van Wijngaarden, et el.fi;ref p
- Page 82 and 83:
162van Wijngaarden, et al.ALGOL 68
- Page 84 and 85:
166van Wijngaarden, et al.ALGOL 68
- Page 86 and 87:
170/van Wijngaarden, etal.ALGOL 68
- Page 88 and 89:
174J)K)L)M)N)O)P)a)b)c)d)e)van Wijn
- Page 90 and 91:
178/van Wijngaarden, et al.ALGOL 68
- Page 92 and 93:
182 van Wijngaarden, et al.• let
- Page 94 and 95:
186van Wijngaarden, et al./ALGOL 68
- Page 96 and 97:
190 van Wijngaarden, etal.composed
- Page 98 and 99:
194h)i)J)van Wijngaa(rden, et al.pr
- Page 100 and 101:
198 van Wijngaarden, et al.¢ strin
- Page 102 and 103:
202tvan Wijngaarden, et al.ALGOL 68
- Page 104 and 105:
206 van Wijngaa~den. et al.10.3.6.1
- Page 106 and 107:
210 van Wijngaarden, et al.!ALGOL 6
- Page 108 and 109:
214 van Wijngaarden, et al.inoperat
- Page 110 and 111:
218fvan Wijngaarden, et al.¢ move
- Page 112 and 113:
222 van Wijngaarden, etaL{overflow}
- Page 114 and 115:
226 van Wijngaarden, et al.ALGOL 68
- Page 116 and 117:
230max int 10.2.1.cmax real 10.2.l.
- Page 118 and 119:
234 van Wijngaarden, et al.ALGOL 68