Previous

10.3.4.10. General patterns

10.3.4.10.1. Syntax a) NEST general pattern{A341c } : NEST insertion{A341d } , letter g{94a} symbol, NEST width specification{b} option.

b) NEST width specification{a} : brief begin{94f } token ; meek integral NEST unit{32d } , NEST after specification{c} option, brief end{94f } token, pragment{92a } sequence option.

c) NEST after specification{b} : and also{94f } token, meek integral NEST unit{32d } , NEST exponent specification{d} option.

d) NEST exponent specification{c} : and also{94f } token, meek integral NEST unit{32d } . {Examples:

}

a)
g ·g(-18, 12, -3)
b)
-18, 12, -3
c)
, 12, -3
d)
, -3
{

aa) A value V is output using a picture P whose pattern Q was yielded by a general-pattern G as follows:

· P is staticized;

· the insertion of Q is performed;

If Q is not parametrized (i.e., Q contains no width-specification).
then V is output using put;
otherwise, if the mode of V is specified by {L} INT or {L} REAL ,
then


· if Q contains one (two, three) parameter(s), V is converted to a string using whole (fixed, float);

· the string is written using put;

otherwise,


· the event routine corresponding to on value error is called;

· if this returns false, V is output using put, and undefined is called;

· the insertion of P is performed.

bb) A value is input to a name N using a picture P whose pattern is a 'general' pattern as follows:

· P is staticized;

· (any parameters are ignored and) the value is input to N using get.}


10.3.4.10.2. Semantics The yield, in an environ E, of a NEST-general-pattern P is a structured value whose mode is 'GPATTERN' and whose fields, taken in order, are

· {i} the yield of the insertion of P:

· {spec} a multiple value W whose mode is 'row of procedure yielding integral', having a descriptor ((1, n)), where n is the number of constituent meek-integral-units of the width-specification-option of P, and n elements determined as follows: For i = 1... n,

· the i-th element of W is a routine, whose mode is 'procedure yielding integral', composed of a procedure-yielding-integral-NEST-routine-text whose unit U is a new unit akin {1.1.3.2.k } to the i-th of those meek-integral-units, together with the environ necessary for U in E.
 
Next