182 van Wijngaarden, et al.• let V 1 .... , Vn be the {collateral} yields of the constituent.frames of P {f};• the fields of W, taken in order, are• {type} 1 (2, 3, 4, 5) if P is an integral- (real-, boolean-, complex-,string-) -pattern and 6 (6, 12, 20) if P is a bits-pattern whoseconstituent RADIX is a radix-two (-four, -eight, -sixteen);• Iframes} a multiple value, whose mode is 'row of FRAME', having adescriptor ((1, n)) and n elements, that selected by (i) being V..f) The yield of a frame F {10.3.4.1.1.m} is a structured value W whosemode is 'FRAME', determined as follows:• the insertion and the replicator, if any, of F are elaborated collaterally;• the fields of W, taken in order, are• {i} the yield of its insertion;• {rep} the yield of its replicator {c}, if any, and, otherwise, the yield ofan invisible replieator;• {supp} true if its UNSUPPRESSETY-suppression contains a letter-ssymboland, otherwise, false:• {marker} {the character which is} the intrinsic value {8.1.4.2.b} of asymbol S determined as follows:Case A: F is a constituent unsuppressible-zero-frame of a sign-mould{such as 3z+} whose constituent sign-marker contains a plus-symbol:• S is a letter-u-symbol;Case B: F is a constituent unsuppressible-zero-frame of a sign-mould{such as 3z-} whose constituent sign-marker contains a minussymbol:• S is a letter-v-symbol;Other cases:• S is the constituent symbol of the marker of F.{Thus the zero-marker z may be passed on as the character "u", "v" or "z"according to whether it forms part of a sign-mould (with descendent plussymbolor minus-symbol) or of an integral-mould.}10.3.4.2. Integral patterns10.3.4.2.1. Syntaxa)b)c)d)e)f)NEST integral pattern{A341c,A343c} :NEST sign mould{c} option, NEST integral mould{b}.NEST integral mouid{a,A343b,c,A347a} :NEST digit frame{A341k} sequence.NEST sign mould{a,A343a} :NEST unsuppressible zero frame{A341k} sequence option,NEST unsuppressible sign frame{A341j}.zero marker{f,A341k} : letter z{94a} symbol.sign marker{A341j} : plus{94c} symbol ; minus{94e} symbol.digit marker{A341k} : letter d{94a} symbol ; zero marker{d}./{Examples:a) "x=" 12z+d b) dc) "x=" 12z+ }ALGOL <strong>68</strong> Revised Report 183{For the semantics of integral-patterns see 10.3.4.1.2.e.}{aa) The modes which are output (input) compatible with an 'integral' •pattern are those specified by Lint (by raiL int).bb) A value Y is converted to a string S using an "integral' pattern Pas follows:• if P contains a sign mould, then the first character of S is the sign of V;otherwise, if V < 0, the conversion is unsuccessful;• the remainder of S contains a decimal representation of V determinedas follows:• the elements of S controlled by "d" and "z" frames are theappropriate digits (thus the pattern specifies the number of digits to beused);• if Y cannot be represented by such a string, the conversion isunsuccessful.(For example, the value 99 could be converted to a string using thepattern zzd, but 9999 and -99 could not.)cc) A string S is converted to an integer suitable for a name N, usingan "integral' pattern, as follows:• the integer I for which S contains a decimal representation (8.1.1.2) isconsidered;• if I is greater than the largest value to which N can refer, theconversion is unsuccessful; otherwise, I is the required integer (e.g., ifthe mode of N is specified by rafshortint, and the value of short max int is65535, then no string containing a decimal representation of a valuegreater than 65535 may be converted).}10.3.4.3. Real patterns10.3.4.3.1. Syntaxa) NEST real pattern{A341c,A345a} : NEST sign mould{A342c} option,NEST variable point mould{b}or alternatively NEST floating point mould{c}.b) NEST variable point mould{a,c} : NEST integral mould{A342b},NEST point frame{A341j}, NEST integral mould{A342b} option ;NEST point frame{A341j}, NEST integral mould{A342b}.c) NEST floating point mould{a} :NEST variable point mould{b}or alternatively NEST integral mould{A342b},NEST exponent frame{A341j}, NEST integral pattern{A342a}.d) point marker{A341j} : point{94b} symbol.e) exponent marker{A341j} : letter e{94a} symbol.
184 van Wijngaarden, et al.{Examples:a) +zd.lld • +.12de+2d b) zd.lld • .12dc) .12de+2d }{For the semantics of real-patterns see 10.3.4.1.2.e.}{aa) The modes which are output (input) compatible with a 'real'pattern are those specified by L real and Lint (by refL real).bb) A value V is converted to a string S using a 'real' pattern P asfollows:• if P contains a sign mould, then the first character of S is the sign of V;otherwise, if Y < 0, the conversion is unsuccessful;• the remainder of S contains a decimal representation of V determinedas follows:• if necessary, V is widened to a real number;• the element of S controlled by the "." Ce") frame, if any, of P is "."("lo")"If P contains an "e" frame,then• let W be the sequence of frames preceding, and IP be the'integral' pattern following, that "e" frame:• an exponent E is calculated by standardizing V to the largestvalue convertible using W (see below):• the part of S controlled by IP is obtained by converting E usingIP (see 10.3.4.2.1.bb):otherwise,• let W be the whole of P:• the elements of S controlled by the "d" and "z" frames of W are theappropriate digits (thus the pattern specifies the number of digits to beused, and the number of digits to be placed after the decimal point, ifany);• if V cannot be represented by such a string, the conversion isunsuccessful.cc) A string S is converted to a real number suitable for a name N,using a "real" pattern, as follows:• the real number R for which S contains a decimal representation isconsidered:• if R is greater than the largest value to which N can refer, theconversion is unsuccessful: otherwise, R is the required real number.}10.3.4.4. Boolean patterns10.3.4.4.1. Syntaxa) NEST boolean pattern{A341c} :NEST unsuppressible boolean frame{A341j}.b) boolean marker{A341j,A348b} : letter b{94a} symbol.{Example:a) 14x b }ALGOL <strong>68</strong> Revised Report 185{For the semantics of boolean-patterns see 10.3.4.1.2.e.}{aa) The mode which is output (input) compatible with a "boolean'pattern is that specified by bool (refbool).bb) A value Y is converted to a string using a 'boolean" pattern asfollows:• if Y is true (false), then the string is that yielded by flip (flop).co) A string S is converted to a boolean value, using a "boolean'pattern, as follows:• if S is the same as the string yielded by flip (flop), then the requiredvalue is true (false).}10.3.4.5. Complex patterns10.3.4.5.1. Syntaxa)b){Example:NEST complex pattern{A341c} : NEST real pattern{A343a},NEST complex frame{A341j}, NEST real pattern{A343a}.complex marker{A341j} : letter i{94a} symbol.a) +.12de+2d 3q"+jx"3"." si +.lOde+2d }{For the semantics of complex-patterns see 10.3.4.1.2.e.}{aa) The modes which are output (input) compatible with a 'complex'pattern are those specified by L compl, L real and Lint (by ref L compl).bb) A value V is converted to a string S using a "eomplex' pattern Pas follows: I• if necessary, V is widened to a complex number;• the element of S controlled by the "i" frame of P is ".1_":• the part of S controlled by the first (seeond) "real" pattern of P is thatobtained by converting the first (second) field of V to a string using thefirst (second) 'real' pattern of P (10.3.4.3.!1.bb); /• if either conversion is unsuccessful, the conversion of V is unsuccessful.cc) A string is converted to a complex value C suitable for a name N,using a 'complex' pattern P, as follows:• the part of the string controlled by the first (second) 'real" pattern of Pis converted to a suitable real number ii0.3.,~.3./1.ec)~,)which then forms thefirst (second) field of C; - i - .• if either conversion is unsuccessful, the conversion to C is unsuccessful.}f
- 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 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 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