78 J van Wijngaarden, et al.C) SECONDARY{B,531a,542c} :: LEAP generator{523a} coercee ;selection{531a} coercee ; PRIMARY{D}.D) PRIMARY{C,532a,543a} :: slice{532a} coercee ; call{543a} coercee ;cast{551a} coercee ; denoter[80a} coercee ;format text{A341a} coercee ;applied identifier with TAG{48b} coercee ;ENCLOSED clause{31a,33a,c,d,e,34a,35a}.{The hyper-rules for "SORT MOlD FORM coercee" are given in 6.1.l.a,b, c, d and e, the entry rules of the coercion syntax. When the coercionsyntax is invoked for some 'SORT MOlD FORM coercee', it will eventuallyreturn to a rule in this chapter for some 'MOLD1 FORM' (blind alleysapart). It is the cross-reference to that rule that is given in themetaproduction rules above. No other visible descendent has beenproduced in the meantime; the coercion syntax merely transforms 'MOLD'into 'MOIDI' for semantical purposes.}a) * SOME hip :SOME jump{544a] ; SOME skip{552a} ; SOME nihil{524a}.{The mode of a hip is always that required, a posteriori, by its context,and its yield is acceptable to that mode. Since any mode is so easilyaccommodated, no coercion is permitted.}5.2. Units associated with names{Names may be assigned to (5.2.1), compared with other names (5.2.2)and created {5.2.3) .}5.2.1. Assignations{In assignations, a value is "assigned" to a name. E.g., in x := 3.14, thereal number yielded by the source 3.14 is assigned to the name yielded bythe destination x.}5.2.1.1. Syntaxa) REF to MODE NEST assignation{5A} :REF to MODE NEST destination{b}, becomes{94c} token,MODE NEST source{c}.b) REF to MODE NEST destination{a} :soft REF to MODE NEST TERTIARY{5B}.c) MODEl NEST source{a,44d} : strong MODE2 NEST unit{32d},where MODEl deflexes to MODE2[47a,b,c,-}.{Examples:a) x := 3.14c) 3.14 }b) x!i!5.2.1.2. SemanticsALGOL <strong>68</strong> Revised Report 79a) An assignation A is elaborated as follows:• let hi and W be the {collateral} yields {a name and another value} of thedestination and source of A;• W is assigned to {b} N;• the yield of A is N.b) A value W is "assigned to" a name N, whose mode is some 'REF toMODE', as follows:It is required that• N be not nil, and that• W be not newer in scope than N;Case A: 'MODE' is some "structured with FIELDS mode':For each 'TAG' selecting a field in W,• that field is assigned to the subname selected by "TAG' in 1'4;Case B: 'MODE" is some 'ROWS of MODEl':• let Y be the Cold} value referred to by N;• it is required that the descriptors of W and Y be identical;For each index I selecting an element in W,• that element is assigned to the subname selected by I in N;Case C: 'MODE" is some 'flexible ROWS of MODEl':• let Y be the Cold} value referred to by N;• N is made to refer to a multiple value composed of(i) the descriptor of W,(ii) variants {4.4.2.c} of some element {possibly a ghost element} of V;• N is endowed with subnames {2.1.3.4.g};For each index I selecting an element in W,• that element is assigned to the subname selected by I in N;Other Cases {e.g., where 'MODE' is some 'PLAIN' or some "UNITED'}:• N is made to refer {2.1.3.2.a} to W.{Observe how, givenflex [1 : O} [1 : 3] int flexfix,the presence of the ghost element (2.1.3.4.c) ensures that the meaning offlexfix := Ioc [1 : 1] [1 : 3] int is well defined, but that of flexfix := Ioc [1 :1] [1: 4] int is not, since the bound pairs of the second dimension aredifferent.}5.2.2. Identity relations{Identity-relations may. be used to ask whether two names of the samemode are the same.E.g., after the assignation draft := Cabc", nil), the identity-relation nextof draft :=: ref book (nil) yields true. However, next of draft :=: nil yieldsfalse because it is equivalent to next of draft :=: ref ref book (nil): the yieldof next of draft, without any coercion, is the name referring to the secondfield of the structured value referred to by the value of draft and, hence,is not nil.}
80 ) van Wijngaarden, et al.5.2.2.1. Syntaxa)b){Examples:boolean NEST identity relation{5A} :where soft balances SORTI and SORT2{32f},SORTI reference to MODE NEST TERTIARYI{5B},identity relator{b},SORT2 reference to MODE NEST TERTIARY2{5B}.identity relator{a} : is{94f} token ; is not{94f} token.a) next of draft :=: refbook (nil)b) :=: •:~: }5.2.3.1. Syntax{LEAP :: local ; heap ; primal.}ALGOL <strong>68</strong> Revised Reporta) reference to MODE NEST LEAP generator{5C} : LEAP{94d,-} token,actual MODE NEST declarer{46a}.b) reference to MODINE NEST LEAP sample generator{44e} :LEAP{94d,-} token, actual MODINE NEST declarer{44b,46a} ;where (LEAP) is (local), actual MODINE NEST declarer{44b,46a}.{Examples:a) Ioc real b) Ioc real • real }{There is no representation for the primal-symbol (see 9.4.a).}81{Observe that al [i] :=: al [j] is not produced by this syntax. Thecomparison, by an identity-relation, of transient names (2.1.3.6.c) is thusprevented.}5.2.2.2. SemanticsThe yield W of an identity-relation I is determined as follows:• let N1 and N2 be the {collateral} yields of the TERTIARYs of I;Case A: The token of the identity-relator of I is an is-token:• W is true if {the name} N1 is the same as N2, and is false otherwise;Case B: The token of the identity-relator of I is an is-not-token:• W is true if N1 is not the same as N2, and is false, otherwise.5.2.3. Generators{And as imagination bodies forthThe forms of things unknown, the poet'spenTurns them to shapes, and gives to airynothingA local habitation and a name.A Midsummer-night's Dream,William Shakespeare.}{The elaboration of a generator, e.g., Ioc real in xx := loc real := 3.14,or of a sample-generator, e.g., [i : n} char in [I : n} char u, v;, involvesthe creation of a name, i.e., the reservation of storage.The use of a local-generator implies (with most implementations) thereservation of storage on a run-time stack, whereas heap-generators implythe reservation of storage in another region, termed the "heap", in whichgarbage-collection techniques may be used for storage retrieval. Since thisis less efficient, local.generators are preferable; this is why only Ioc maybe omitted from sample-generators of variable-declarations.}5.2.3.2. Semanticsa) The yield W of a LEAP-generator or LEAP-sample-generator G, inan environ E, is determined as follows:• W is a newly created name which is made to refer {2.1.3.2.a} to the yieldin E of the actual-declarer {4.4.2.d, 4.6.2.a} of G:• W is equal in scope to the environ E1 determined as follows:Case A: "LEAP' is 'local':• El is the "local environ" {b} accessible from E:Case B: 'LEAP' is 'heap':• El is {the first environ created during the elaboration of theparticular-program, which is} such that(i) the primal environ {2.2.2.a} is the environ of the environ of theenviron of E1 {sic}, and(ii) El is, or is older than, E;Case C: 'LEAP' is "primal':• El is the primal environ;• if W is a stowed name {2.1.3.2.b}, then W is endowed with subnames{2.1.3.3.e, 2.1.3.4.g}.{The only examples of primal-generators occur in the standard- andsystem-preludes (10.3.1.l.h, 10.3.1.4.b,n,o, 10.4.l.a).When G is a reference-to-routine-sample.generator, the mode of W is ofno relevance.}b) The "local environ" accessible from an environ E is an environ Eldetermined as follows:If E is "nonlocal" {3.2.2.b},then El is the local environ accessible from the environ of E:otherwise, E1 is E.{An environ is nonlocal if it has been established according to a serialclauseor enquiry-clause which contains no constituent mode-, identifier-,or operation.declaration, or according to a for-part (3.5.1.b) or aspecification (3.4.l.j,k) .}
- 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 36 and 37: 70 van Wijngaarden, et el.For each
- Page 38 and 39: 74 van Wijngaarden, et al.If 'MODE"
- 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