Previous

6.7. Voiding

{Voiding is used to discard the yield of some unit whose primary purpose is to cause its side-effects; the a posteriori mode is then simply 'void'. For example, in x:=1; y:=1;, the assignation y:=1 is voided, and in PROC t = INT: ENTIER(random * 100); t;, the applied-identifier t is voided after a deproceduring, which prescribes the calling of a routine.

Assignations and other COMORFs are voided without any deproceduring so that, in PROC VOID p: p := finish, the assignation p := finish does not prescribe an unexpected calling of the routine finish.}

6.7.1. Syntax

A) NONPROC :: PLAIN ; STOWED ; REF to NONPROC ; procedure with PARAMETERS yielding MOID ; UNITED.

a) voided to{61A } void MORF : deprocedured to{63a } NONPROC MORF ; unchanged from{61f} NONPROC MORF.

b) voided to{61A } void COMORF : unchanged from{61f } MODE COMORF. {Examples:

}

a)
random (in SKIP; random;) ·next random(last random) (in SKIP; next random(last random);)
b)
PROC VOID(pp) (in PROC PROC VOID pp = PROC VOID: (print(1); VOID: print(2)); PROC VOID(pp);)

6.7.2. Semantics

The elaboration of a voided-to-void-FORM consists of that of its direct descendent, and yields empty.
 
Next