Previous

6.3. Deproceduring

{Deproceduring is used when a routine without parameters is to be called. E.g., in x := random, the routine yielded by random is called and the real number yielded is assigned; the a posteriori mode of random is 'real'. Syntactically, an initial 'procedure yielding' is removed from the a priori mode.}

6.3.1. Syntax

a) deprocedured to{61C ,67a} MOID FORM : MEEK{61C } procedure yielding MOID FORM.

b) softly deprocedured to{61D } MODE FORM : SOFT{61D } procedure yielding MODE FORM. {Examples:

}

a)
random (in REAL(random))
b)
x or y (in x or y := 3.14, see 1.1.2 )

6.3.2. Semantics

The yield W of a deprocedured-to-MOID-FORM or softly-deprocedured-to-MOID-FORM F, in an environ E, is determined as follows:

· let {the routine} R be the yield in E of the direct descendent of F;

· W is the yield of the calling {5.4.3.2.b } of R in E;

· it is required that W be not newer in scope than E.
 
Next