114van Wijngaarden, et al.ALGOL <strong>68</strong> Revised Report 115d)e)f)g)h)CHOICE STYLE out{341} :where (CHOICE) is (choice using boolean),STYLE else{94f,-} token ;where (CHOICE) is (CASE), STYLE out{94f,-} token.CHOICE STYLE finish{34a} :where (CHOICE) is (choice using boolean),STYLE fi{94f,-} token ;where (CHOICE) is (CASE), STYLE esac{94f,-} token.NOTION token : pragment{92a} sequence option,NOTION symbol{94a,b,c,d,e, f,g,h}.* token : NOTION token{f}.* symbol : NOTION symbol{94a,b,c,d,e,f,g,h}.9.2. Comments and pragmats{A source of innocent merriment.Mikado,W.S.Gilbert.}{A pragment is a comment or a pragmat. No semantics of pragmentsis given and therefore the meaning (2.1.4.1.a) of any program is quiteunaffected by their presence. It is indeed the intention that commentsshould be entirely ignored by the implementation, their sole purpose beingthe enlightenment of the human interpreter of the program.Pragmats may, on the other hand, convey to the implementation somepiece of information affecting some aspect of the meaning of the programwhich is not defined by this Report, for example:• the action to be taken upon overflow (2.1.4.3.h) or if the scoperule is violated (as in 5.2.1.2.b), e.g., proverflow check onpr,pr overflow check off pr. pr scope check on pr or pr scope check off pr:• the action to be taken upon completion of the compilationprocess, e.g., pr compile only pr, pr dump pr or pr run pr:• that the language to be implemented is some sublanguage orsuperlanguage of ALGOL <strong>68</strong>, e.g., prnonrecpr (for a routine-textwhich may be presumed to be non-recursive):• that the compilation may check for the truth, or attempt to provethe correctness, of some assertion, e.g.:int a, b; read((a, b)) pr assert a >_0 ^ b > O pr;intq:=O,r:=a;while r >_ b pr assert a = b x q + r a 0
116 van Wijngaarden, et al.supposed preference of some human or mechanical interpreter of I thelanguage may be termed "publication" or "hardware" languages. {Thereference language is intended to be used for the representation ofparticular-programs and of their descendents. It is, however, also used inChapter 10 for the definition of the standard environment.}b) A "construct in a representation language" is obtained from theterminal production T {1.1.3.2.f} of the corresponding construct in the strictlanguage {1.1.3.2.e} by replacing the symbols in T by their representations,as specified in 9.4 below in the case of the reference language.{Thus, the strict-language particular-program whose terminalproduction is"bold begin symbol" 'skip symbol' 'bold end symbol"gives rise to the reference language particular-programbegin skip end .}c) An implementation {2.2.2.c} of ALGOL <strong>68</strong> which usesrepresentations which are sufficiently close to those of the referencelanguage to be recognized without further elucidation, and which does notaugment or restrict the available representations other than as providedfor below {9.4.a,b,c}, is an "implementation of the reference language".{E.g., begin, begin, BEGIN, I'begin and 'begin' could all berepresentations of the bold-begin.symbol in an implementation of thereference language; some combination of holes in a punched card mightbe a representation of it in some hardware language.}9.4. The reference languagea) The reference language provides representations for varioussymbols, including an arbitrarily large number of TAX-symbols {whereTAX :: TAG ; TAB ; TAD ; TAM.}. The representations of some of themare specified below {9.4.1}, and to these may be added suitablerepresentations for style-TALLY.letter-ABC.symbols and style-TALLYmonad-symbolsand any terminal productions of 'STYLE other PRAGMENTitem' {9.2.1.d} and of 'other string item' {8.1.4.1.d}. Representations are notprovided for any of these {but they enable individual implementations tomake available their full character sets for use as characters, to provideadditional or extended alphabets for the construction of TAG- and TABsymbols,and to provide additional symbols for use as operators}. There isnot, however, {and there must not be,} except in representations of thestandard., and other, preludes {10.1.3.Step 6}, any representation of theletter.aleph-symbol or the primal.symbol. {For the remaining TAXsymbols,see 9.4.2. There are, however, some symbols produced by thesyntax, e.g., the brief-pragmat-symbol, for which no representation isprovided at all. This does not preclude the representation of such symbolsin other representation languages.}ALGOL <strong>68</strong> Revised Reportb) Where more than one representation of a symbol is given, any ofthem may be chosen. Moreover, it is sufficient for an implementation ofthe reference language to provide only one. Also, it is not necessary toprovide a representation of any particular MONAD-symbol or NOMADsymbolso long as those that are provided are sufficient to represent at .least one version {10.1.3.Step 3} of each operator declared in the standardprelude.{For certain different symbols, one same or nearly the samerepresentation is given; e.g., the representation ":" is given for the routinesymbol,the colon-symbol and the up-to-symbol and ":" for the labelsymbol.It follows uniquely from the syntax which of these four symbols isrepresented by an occurrence, outside comments, pragmats and stringdenotations,of any mark similar to either of those representations. It isalso the case that ".." could be used, without ambiguity, for any of them,and such might indeed be necessary in implementations with limitedcharacter sets. It may be noted that, for such implementations, noambiguity would be introduced were "(/" and "/)" to be used asrepresentations of the style-ii-sub-symbol and the style-ii.bus.symbol,respectively.Also, some of the given representations appear to be composite:e.g., the representation ":=" of the becomes-symbol appears to consist of":", the representation of the routine-symbol, etc., and "=", therepresentation of the equals.symbol and of the is-defined-as-symbol. Itfollows from the syntax that ":=" can occur, outside comments, pragmatsand string.denotations, as a representation of the becomes-symbol only(since "=" cannot occur as the representation of a monadic-operator).Similarly, the other given composite representations do not causeambiguity.}c) The fact that the representations of the letter-ABC-symbols given{9.4.1.a} are usually spoken of as small letters is not meant to imply thatthe corresponding capital letters could not serve equally well. {On theother hand, if both a small letter and the corresponding capital letteroccur, then one of them is presumably the representation of some style-TALLY-letter-ABC-symbol or of a bold-lettcr-ABC-symbol. See also l.l.5.bfor the possibility of additional "ABC's in a variant of the language.}d) A "typographical display feature" is a blank, or a change to a newline or a new page. Such features, when they appear between the symbolsof a construct in the reference language, are of no significance and do notaffect the meaning of that construct. However, a blank contained within astring- or character-denotation is one of the representations of the spacesymbol{9.4.1.b} rather than a typographical display feature. Where therepresentation of a symbol in the reference language is comp~ed ofseveral marks {e.g., to, :=}, those marks form one {indivisible} symbol and,unless the contrary is explicitly stated {9.4.2.2.a,c}, typographical displayfeatures may not separate them.l l7
- 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 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