90 van Wijngaarden, et al.5.4.4.1. Syntaxa) strong MOlD NEST jump{5A} : go to{b} option,label NEST applied identifier with TAG{48b}.b) go to{a} : STYLE go to{94f,-} token ;STYLE go{94f,-} token, STYLE to symbol{94g,-}.{Examples:a) goto kootwijk • go to warsaw • zandvoortb) goto • go to }5.4.4.2. SemanticsA MOlD-NEST-jump J, in an environ E, is elaborated as follows:• let the scene yielded in E by the label-identifier of d be composed of aseries $2 and an environ El;Case A: 'MOLD' is not any 'procedure yielding MOIDI':• let $1 be the series of the smallest {1.1.3.2.g} serial-clause containing$2;• the elaboration of $1 in El, or of any series in E1 elaborated in itsplace, is terminated {2.1.4.3.e}:• $2 in E1 is elaborated "in place of" $1 in El;Case B: 'MOLD' is some "procedure yielding MOIDI':• J in E {is completed and} yields the routine composed of(i) a new MOlD-NEST-routine-text whose unit is akin {1.1.3.2.k} to J,(ii) El.5.5. Units associated with values of any mode5.5.1. Casts{Casts may be used to provide a strong position. For example, tel real(xx) in tel real (xx) := 1, tel book (nil) in next of draft :=: rof book (nil) andstring (p I c l r) in s +:= string (p [ c l r).}5.5.1.1. Syntaxa) MOlD NEST cast{5D} : formal MOlD NEST declarer{46b},strong MOlD NEST ENCLOSED clause{31a,33a,c,d,e,34a,35a,-}.{Example:a) refbook (nil) }{The yield of a cast is that of its ENCLOSED-clause, by way of preelaboration(2.1.4.1.c).}5.5.2. Skips5.5.2.1. Syntaxa) strong MOlD NEST skip{5A} : skip{94f} token.5.5.2.2. SemanticsALGOL <strong>68</strong> Revised Report 91The yield of a skip is some {undefined} value equal in scope to theprimal environ.{The mode of the yield of a MOlD-skip is 'MOLD'. A void-skip serves asa dummy statement and may be used, for example, after a label whichmarks the end of a serial-clause.}PART IIIContext Dependence{This Part deals with those rules which do not alter the underlyingsyntactical structure:• the transformations of modes implicitly defined by the context, withtheir accompanying actions;• the syntax needed for the equivalence of modes and for the safeapplication of the properties kept in the nests.}6. Coercion{The coercions produce a coereend from a eoereee according to threecriteria: the a priori mode of the eoercend before the application of anycoercion, the a posteriori mode of the coercee required after thosecoercions, and the syntactic position or "sort" of the coercee. Coercionsmay be cascaded.There are six possible coercions, termed "deproceduring","dereferencing", "uniting", "widening", "rowing" and "voiding". Eachcoercion, except "uniting", prescribes a corresponding dynamic effect onthe associated values. Hence, a number of primitive actions can beprogrammed implicitly by coercions.}6.1. CoerceesCA eoercee is a construct whose production tree may begin a sequenceof coercions ending in a coercend. The order of (completion of) theelaboration of the coercions is therefore from the coercend to the eoercee(hence the choice of these paranotions). For example, / in real(i) is aeoercee whose production tree involves 'widened to" and 'dereferenced to',in that order, in passing from the coercee to the coercend. Note that thedereferencing must be completed before the widening takes place.
92 van Wijngaarden, et al.ALGOL <strong>68</strong> Revised Report93The relevant production tree (with elision of "NEST',"with TAG', and with invisible subtrees omitted) is:Iwidening coerciondereferencing coercion6.1.1. SyntaxA)B)C)D)E)F)G)a)b)c)d)e)f)g)h)'strong real identifier coercee'I 6.1.1.a* 'widened to real identifier'I 6.5.1.a'dereferenced to integral identifier'I 6.2.1.a'applied' and[ 'unchanged from reference to integral identifier'[ 6.1.l.f'reference to integral identifier' (coercend)[ 4.S.l.b, 9.1.f I'letter i symbol' .}STRONG{a,66a} :: FIRM{B} ; widened to{65a,b,c,d} ; rowed to{66a} ;voided to{67a,b}.FIRM{A,b} :: MEEK{C} ; united to{64a}.MEEK{B,c,d,62a,63a,64a,65a,b,c,d} :: unchanged from{f} ;dereferenced to{62a} ; deprocedured to{63a}.SOFT{e,63b} :: unchanged from{f} ; softly deprocedured to{63b}.FORM :: MORF ; COMORF.MORF :: NEST selection ; NEST slice ; NEST routine text ;NEST ADIC formula ; NEST call ;NEST applied identifier with TAG.COMORF :: NEST assignation ; NEST identity relation ;NEST LEAP generator ; NEST cast ; NEST denoter ;NEST format text.strong MOlD FORM coercee{5A,B,C,D,A341i} :where (FORM) is (MORF), STRONG{A} MOlD MORF ;where (FORM) is (COMORF), STRONG{A} MOlD COMORF,unless (STRONG MOLD) is (deprocedured to void).firm MODE FORM coercee{5A,B,C,D,542c} : FIRM{B} MODE FORM.meek MOlD FORM coercee{5A,B,C,D} : MEEK[C} MOlD FORM.weak REFETY STOWED FORM coercee{5A,B,C,D} :MEEK{C} REFETY STOWED FORM,unless (MEEK) is (dereferenced to)and (REFETY) is (EMPTY).soft MODE FORM coercee{5A,B,C,D} : SOFT{D} MODE FORM.unchanged from MOlD FORM{C,D,67a,b} : MOlD FORM.* SORT MOID coercee : SORT MOID FORM coercee{a,b,c,d,e}.* MOID coercend : MOID FORM.{Examples:a) 3.14 (in x := 3.14)b) 3.14 (in x + 3.14)c) sin (in sin (x))d) xl (in xl [2] := 3.14)e) x (in x := 3.14) }{For 'MOLD FORM" (rule f), see the cross-references inserted insections 5.I.A,B,C,D before "coercee". Note, however, that a 'MOLD FORM'may be a blind alley. Blind alleys within this chapter are not indicated.}{There are five sorts of syntactic position. They are:• "strong" positions, i.e., actual-parameters, e.g., x in sin(x), sources;e.g., x in y:=x, the ENCLOSED-clause of a cast, e.g., (nil) inref book (nil), and statements, e.g., y := x in (y : = x; x : = 0);• "firm" positions, i.e., operands, e.g., x in x+y;• "meek" positions, i.e., enquiry-clauses, e.g., x>O in (x~Olx[O),boundscripts, e.g., i in xl [i], and the PRIMARY of a call, e.g., sin insin (x);• "weak" positions, i.e., the SECONDARY of a selection and thePRIMARY of a slice, e.g., xl in xl [i];• "soft" positions, i.e., destinations, e.g., x in x := y and one of theTERTIARYs of an identity-relation, e.g., x in xx :=: x.Strong positions also arise in balancing (3.2.1.e).In strong positions, all six coercions may occur; in firm positions,rowing, widening and voiding are forbidden; in meek and weak positions,uniting is forbidden also, and in soft positions only deproceduring isallowed. However, a dereferenccd-to-STOWED-FORM may not be directlydescended from a weak-STOWED-FORM-coercee (rule d) for, otherwise,x :=xl [i] would be syntactically ambiguous (although, in this case, notsemantically). Also, a deprocedured-to-void-COMORF may not be directlydescended from a strong-void-COMORF-coercee (rule a) for, otherwise,(proc void engelfriet; proc void rijpens = skip; engelfriet : = rijpens; skip)would be ambiguous.}6.2. Dereferencing{Dereferencing serves to obtain the value referred to by a name, as inx:=y, where y yields a name referring to a real number and it is thisnumber which is assigned to the name yielded by x. The a priori mode ofy, regarded as a coercend, is 'reference to real' and its a posteriori mode,when y is regarded as a coercee, is 'real'.}6.2.1. Syntaxa) dereferenced to{61C} MODEl FORM :MEEK{61C} REF to MODE2 FORM,where MODE2 deflexes to MODEl{47a,b,c,-}.
- 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 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 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