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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

56 van Wijngaarden, et al.3.2.2. Semanticsa) The yield of a serial-clause, in an environ E, is the yield of theelaboration of its series, or of any series elaborated "in its place" {5.4.4.2},in the environ "established" {b} around E according to that serial-clause; itis required that the yield be not newer in scope than E.b) The environ E "established"• upon an environ El, possibly not specified, {which determines itsscope,}• around an environ E2 {which determines its composition},• according to a NOTlON-defining-new-PROPSETY C, possibly absent,{which prescribes its locale,}• with values Y 1 ..... Y n, possibly absent, {which are possibly to beascribed,}is determined as follows:• if E1 is not specified, then let E1 be E2:• E is newer in scope than E1 and is composed of E2 and a new localecorresponding to 'PROPSETY', if C is present, and to 'EMPTY' otherwise;Case A: C is an establishing-clause:For each constituent mode-definition hi, if any, of C,• the scene composed of(i) the actual-declarer of M, and(ii) the environ necessary for {7.2.2.c} that actual-declarer in E,is ascribed in E to the mode-indication of M:For each constituent label.definition L, if any, of C,• the scene composed of(i) the series of which L is a direct descendent, and(ii) the environ E,is ascribed in E to the label-identifier of L:If each 'PROP' enveloped by 'PROPSETY' is some "DYADIC TAD" or'label TAG',then E is said to be "nonlocal" {see 5.2.3.2.b};Case B: G is a declarative, a for-part or a specification:For i= 1 ..... n, where n is the number of 'DEC's enveloped by'PROPSETY',• Y. is ascribed {4.8.2.a} in E to the i-th constituent defining-Iidentifier, if any, of G and, otherwise {in the case of an invisible forpart},to an integral-defining-indicator.with-letter-aleph;If C is a for-part or a specification,then E is nonlocal.{Other cases, i.e., when C is absent:• E is local (see 5.2.3.2.b), but not further defined.}c) The yield W of a series C is determined as follows:If C contains a direct descendent unit which is not followed by a go-ontoken,ALGOL <strong>68</strong> Revised Reportthen• W is the yield of that unit;otherwise,• the declaration or the unit, if any, of C is elaborated;• W is the yield of the series of C.{See also 5.4.4.2.Case A.}3.3. Collateral and parallel clauses{Collateral-clauses allow an arbitrary merging of streams of actions.Parallel.clauses provide, moreover, levels of coordination for thesynchronization (10.2.4) of that merging.A collateral- or parallel-clause consists of a sequence of units separatedby and-also-symbols (viz., ","), and is enclosed by parentheses or by abegin-end pair; a parallel-clause begins moreover with par.Collateral-clauses, but not parallel-clauses, may yield stowed valuescomposed from the yields of the constituent units.Examples of collateral.clauses yielding stowed values:[ ] int q = (1, 4, 9, 16, 25);struct (int price, string category) bike := (150, "sport").Example of a parallel-clause which synchronizes eating and speaking:pro¢ void eat, speak; soma mouth = level 1;par begindodown mouth;eat;up mouthod,dodown mouth;speak;up mouthodend .}3.3.1. Syntaxa) strong void NEST collateral clause{5D,551a} :strong void NEST joined portrait{b} PACK.b) SOlD NEST joined portrait{a,b,c,d,34g} :where SOlD balances SOIDI and SOlD2{32e},SOIDI NEST unit{32d}, and also{94f} token,SOLD2 NEST unit{32d}or alternatively SOLD2 NEST joined portrait{b}.c) strong void NEST parallel clause{5D,551a} :parallel{94f} token, strong void NEST joined portrait{b} PACK.d) strong ROWS of MODE NEST collateral clause{5D,551a} :where (ROWS) is (row),strong MODE NEST joined portrait{b} PACK ;57

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

Saved successfully!

Ooh no, something went wrong!