70 van Wijngaarden, et el.For each constituent identity-definition D1 of D,• the yield V of the source-for-MODINE of Ol is ascribed {4.8.2.a} to thedefining-identifier of D1.b) A variable-declaration D is elaborated as follows:• the sample-generator {5.2.3.1.b} G of D and all the sources.for-MODINE,if any, of the constituent variable-definitions of D are elaboratedcollaterally;For each constituent variable-definition-of-referenee-to-MODE-TAG D1 ofD,• let Wl be a "variant" {c}, for 'MODE', of the value referred to by theyield N of G;• let N1 be a newly created name equal in scope to N and referring toW1;• if N1 is a stowed name {2.1.3.2.b}, then N1 is endowed with subnames{2.1.3.3.e, 2.1.3.4.g};• N1 is ascribed {4.8.2.a} to the defining-identifier of D1;• the yield of the source-for-MODINE, if any, of D1 is assigned{5.2.1.2.b} to N1.{An actual-declarer which is common to a number of variabledefinitionsis elaborated only once. For example, the elaboration ofintm := 10; [1 : m+:= 1} intp, q; print(m)causes 11 to be printed, and not 12; moreover, two new local namesreferring to multiple values with descriptor ((1, 11)), and undefinedelements, are ascribed to p and to q.}c) A "variant" of a value V, for a mode M, is a value W acceptable to{2.1.3.6.d} M, and determined as follows:Case A: M is some 'structured with FIELDS mode':For each "MODE field TAG' enveloped by 'FIELDS',• the field selected by 'TAG" in W is a variant, for 'MODE', of thefield selected by "TAG' in V;Case B: M is some 'FLEXETY ROWS of MODEl':• the descriptor of W is that of V;• each element of W is a variant, for 'MODEl', of some element of V;Other Cases:• W is any value acceptable to M.d) The yield of an actual-routine-declarer is some routine {whose modeis of no relevance}.4.5. Operation declarations{Operation-declarations provide defining-operators.Example:op mc = (reat a, b) real : (3 × a < b l a l b).Unlike the case with, e.g., identifier-declarations, more than oneoperation-declaration involving the same TAO-token may occur in theALGOL <strong>68</strong> Revised Report 71same reach; e.g., the previous example may very well be in the samereach asop mc = (compl carthy, john) tempi : (random < .51 carthy I john);the operator mc is then said to be "overloaded".}4.5.1. SyntaxA) PRAM :: DUO ; MONO.B) TAO :: TAD ; TAM.a) NEST MODINE operation declaration of DECS{41a} :operator{94d} token, formal MODINE NEST plan{b,46p,-},NEST MODINE operation joined definition of DECS{41b,c}.b) formal routine NEST plan{a} : EMPTY.c) NEST MODINE operation definition of PRAM TAO{41c} :PRAM NEST defining operator with TAO{48a},is defined as{94d} token, PRAM NEST source for MODINE{44d}.{Examples:a) op v =(boola, b)bool: (al true[ b)c) v = (boot a, b) bool : (a I true [ b) }4.5.2. Semanticsa) The elaboration of an operation-declaration consists of thecollateral elaboration of its constituent operation-definitions.b) An operation-definition is elaborated by ascribing {4.8.2.a} theroutine yielded by its source-for-MODINE to its defining-operator.4.6. Declarers{Declarers specify modes. A declarer is either a declarator, whichexplicitly constructs a mode, or an applied-mode-indication, which standsfor some declarator by way of a mode-declaration. Declarators are builtfrom void, inl, real, boot and char (10.2.2), with the assistance of othersymbols such as ref, struct, [ ], proc, and union. For example,proc (real)bool specifies the mode 'procedure with real parameter yieldingboolean'.Actual-declarers, used typically in generators, require the presence ofbounds. Formal.declarers, used typically in formal-parameters and casts,are without bounds. The declarer following a ref is always 'virtual'; it maythen specify a "flexible ROWS of MODE', because flexibility is a propertyof names. Since actual-declarers follow an implicit 'reference to' ingenerators, they may also specify 'flexible ROWS of MODE'.}4.6.1. SyntaxA) VICTAL :: VIRACT ; formal.B) VIRACT :: virtual ; actual.C) MOLDS :: MOlD ; MOLDS MOLD.
72a)b)c)d)e)g)h)J)k)1)m)n)o)p)van Wijngaarden, et al.VIRACT MOlD NEST declarer{c,e,g,h,523a,b} :VIRACT MOlD NEST declarator{c,d,g,h,o,s,-} ;MOlD TALLY NEST applied mode indication with TAB{48b,-}.formal MOlD NEST declarer{e,h,p,r,u,34k,44a,541a,b,e,551a} :where MOlD deflexes to MOlD{47a,b,c,-},formal MOlD NEST declarator{c,d,h,o,s,-} ;MOIDI TALLY NEST applied mode indication with TAB{48b,-},where MOIDI deflexes to MOID{47a,b,c,-}.VICTAL reference to MODE NEST declarator{a,b,42c} :reference to{94d} token, virtual MODE NEST declarer{a}.VICTAL structured with FIELDS mode NEST declarator{a,b,42c} :structure{94d} token,VICTAL FIELDS NEST portrayer of FIELDS{e} brief pack.VICTAL FIELDS rNEST portrayer of FIELDSI{d,e} :VICTAL MODE NEST declarer{a,b},NEST MODE FIELDS joined definition of FIELDSI{41b,c} ;where (FIELDSI) is (FIELDS2 FIELDS3),VICTAL MODE NEST declarer{a,b},NEST MODE FIELDS joined definition of FIELDS2{41b,c},and also{94f} token,VICTAL FIELDS NEST portrayer of FIELDS3{e}.NEST MODE FIELDS definition of MODE field TAG{41c} :MODE field FIELDS defining field selector with TAG{48c}.VIRACT flexible ROWS of MODE NEST declarator{a,42c} :flexible{94d} token, VIRACT ROWS of MODE NEST declarer{a}.VICTAL ROWS of MODE NEST declarator{a,b,42c} :VICTAL ROWS NEST rower{i,j,k,l} STYLE bracket,VICTAL MODE NEST declarer{a,b}.VICTAL row ROWS NEST rower{h,i} :VICTAL row NEST rower{j,k,l}, and also{94f} token,VICTAL ROWS NEST rower{i,j,k,l}.actual row NEST rower{h,i} : NEST lower bound{m}, up to{94f} token,NEST upper bound{n} ; NEST upper bound{n}.virtual row NEST rower{h,i} : up to{94f} token option.formal row NEST rower{hA} : up to{94f} token option.NEST lower bound{j,532f,g} : meek integral NEST unit{32d}.NEST upper bound{j,532f} : meek integral NEST unit{32d}.VICTAL PROCEDURE NEST declarator{a,b,42c} :procedure{94d} token, formal PROCEDURE NEST plan{p}.formal procedure PARAMETY yielding MOlD NEST plan{o,45a} :where (PARAMETY) is (EMPTY), formal MOlD NEST declarer{b} ;where (PARAMETY) is (with PARAMETERS),PARAMETERS NEST joined declarer{q,r} brief pack,formal MOlD NEST declarer{b}.q)r)s)t)u){Examples:ALGOL <strong>68</strong> Revised ReportPARAMETERS PARAMETER NEST joined declarer{p,q} :PARAMETERS NEST joined deelarer{q,r}, and also{94f} token,PARAMETER NEST joined declarer{r}.MODE parameter NEST joined declarer{p,q} :formal MODE NEST declarer{b}.VICTAL union of MOODSI MOOI)I modeNEST declarator{a,b,42c} :unless EMPTY with MOODSI MOODI incestuous{47f},union of{94d} token,MOII)S NEST joined declarer{t,u} brief pack,where MOLDS ravels to MOOI)S2{47g}and safe MOODSI MOOI)I subset of safe MOOI)$2{731}and safe MOODS2 subset of safe MOOI)SI MOODI{731,m}.MOLDS MOlD NEST joined declarer{s,t} :MOLDS NEST joined declarer{t,u}, and also{94f} token,MOlD NEST joined declarer{u}.MOlD NEST joined declarer{s,t} : formal MOll) NEST declarer{b}.a) [1 : n] real • person b) [ ] real • stringc) ref reald) struct (int age, ref person father, son)e) ref person father, son • int age, ref person father, sonf) age g) flex [1 : n] realh) [1: m,l: nJreal i) 1: m, 1: nj) l:n k) :1): m) 1n) n o) proc (bool, 0ool) boo/p) (bool, bool) bool q) boo/, boolr) bool s) union (inI, char)t) int, char u) inl }{For actuaI-MOII)-TALLY.declarers, see 4.2.1.c: for actual-routinedeclarers,see 4.4.1.b.There are no declarers specifying modes such as 'union of integralunion of integral real mode mode" or 'union of integral real integralmode'. The declarers union (int, union (int, real)) and union (int, real, int)may indeed be written, but in both cases the mode specified is 'union ofintegral real mode' (which can as well be spelled "union of real integralmode') .}4.6.2. Semanticsa) The yield W of an actual-MODE-declarer D, in an environ E,determined as follows:is73
- 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 26 and 27: 50 van Wijngaarden, et al.c) The ph
- 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 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