10.07.2015 Views

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

112 van Wijngaarden, et al.j) radix eight digit{c,k} : radix four digit{i} ; digit four symbol{94b} ;digit five symbol{94b} ; digit six symbol{94b} ;digit seven symbol{94b}.k) radix sixteen digit{c} : radix eight digit{j} ; digit eight symbol{94b} ;digit nine symbol{94b} ; letter a symbol{94a} ;letter b symbol{94a} ; letter c symbol{94a} ; letter d symbol{94a} ;letter e symboi{94a} ; letter f symbol{94a}.l) * bits denotation : BITS denotation{a,b,c}.{BITS :: structured withrow of boolean field SITHET~ letter aleph mode.}m) • radix digit : RADIX digit{h,i,j,k}.{Examples:a) long 2r101c) 8r231 }8.2.2. Semanticsb) short 16rffffa) The yield V of a bits-denotation D is determined as follows:• let W be the intrinsic boolean value {b} of its constituent RADIX-digitsequence:• let m be the length of W;• let n be the value of L bits width {10.2.1.j}, where L stands for as manytimes long (short) as there are long-symbols (short-symbols) contained inD;• it is required that m be not greater than n:• Y is a structured value {whose mode is some "BITS'} whose only field isa multiple value having(i) a descriptor ((1, n)) and(ii) n elements, that selected by (i) being false if 1 s_ i s_ n - m, and beingthe (i + m - n)-th truth value of {the sequence} W otherwise.b) The intrinsic boolean value of a RAI)lX-digit-sequence $ is theshortest sequence of truth values which, regarded as a binary number(true corresponding to 1 and false to 0), is the same as the intrinsicintegral value (c} of S.c) The intrinsic integral value of a radix-two- (radix-four-.radix-eight-, radix-sixteen-) -digit-sequence S is the integer of which thereference-language form of S {9.3.b} is a binary, (quaternary, octal.hexadecimal) representation, where the representations a. b, c, d, e and f,considered as digits, have values 10, 11, 12, 13, 14 and 15 respectively.8.3. String denotations{String-denotations are a convenient way of specifying "strings", i.e.,multiple values of mode "row of character'.Example:string message := "all is well" }8.3.1. Syntaxa)b)c){Examples:a) "abc"ALGOL <strong>68</strong> Revised Reportrow of character denotation{80a} :quote{94b} symbol, string{b} option, quote symboi{94b}.string{a} : string item{814b}, string item{814b} sequence.6.3.2. Semanticsstring denotation : row of character denotation{a}.b) abc }The yield of a string-denotation D is a multiple value V determined asfollows:• let n be the number of string-items contained in D;• the descriptor of V is ((1, n));• for i = 1 ..... n, the element of V with index (i) is the intrinsic value{8.1.4.2.b} of the i-th constituent symbol of the string of D.{"a" is a character-denotation, not a string-denotation. However, in allstrong positions, e.g., string s := "a", it can be rowed to a multiple value(6.6). Elsewhere, where a multiple value is required, a cast (5.5.1.1.a)may be used, e.g., union (char, string) cs := string ("a").}9. Tokens and symbols9.1. Tokens{Tokens (9.1.l.f) are symbols (9.1.1.h) possibly preceded by pragments(9.2.1.a). Therefore, pragments may appear between symbols whereverthe syntax produces a succession of tokens. However, in a few places, thesyntax specifically produces symbols rather than tokens, notably withindenotations (8), format.texts (10.3.4.1.1.a) and, of course, withinpragments. Therefore, pragments may not occur in these places.}9.1.1. Syntaxa) CHOICE STYLE start{34a} :where (CHOICE) is (choice using boolean),STYLE if{94f,-} token ;where (CHOICE) is (CASE), STYLE case{94f,-} token.b) CHOICE STYLE in{34e} :where (CHOICE) is (choice using boolean),STYLE then{94f,-} token ;where (CHOICE) is (CASE), STYLE in{94f,-} token.c) CHOICE STYLE again{341} :where (CHOICE) is (choice using boolean), "STYLE else if{94f,-} token ;where (CHOICE) is (CASE), STYLE ouse{94f,-} token.113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!