Previous

6.6. Rowing

{Rowing permits the building of a multiple value from a single element. If the latter is a name then the result of rowing may also be a name referring to that multiple value.

Example:

[ 1: 1] REAL b1 := 4.13 
.
}

6.6.1. Syntax

a) rowed to{61A } REFETY ROWS1 of MODE FORM : where (ROWS1) is (row), STRONG{61A } REFLEXETY MODE FORM, where (REFETY) is derived from (REFLEXETY){531b,c ,-}; where (ROWS1) is (row ROWS2), STRONG{61A } REFLEXETY ROWS2 of MODE FORM, where (REFETY) is derived from (REFLEXETY){531b,c ,-}. {Examples:

}

a)
4.13 (in [1: 1] REAL b1 := 4.13) ·x1 (in [ 1:1, 1: n] REAL b2 := x1)

6.6.2. Semantics

a) The yield W of a rowed-to-REFETY-ROWS1-of-MODE-FORM F is determined as follows:

· let V be the yield of the STRONG-FORM of F;

Case A: 'REFETY' is 'EMPTY':


· W is the multiple value "built" {b}from V for 'ROWS1';

Case B: 'REFETY' is 'REF to':
If V is nil,
then W is a nil name;
otherwise, W is the name "built" {c}from V for 'ROWS1'.

b) The multiple value W "built" from a value V, for some 'ROWS1', is determined as follows:

Case A: 'ROWS1' is 'row':


· W is composed of

( 1) a descriptor ((1,1)),
( 2) {one element} V;

Case B: 'ROWS1' is some 'row ROWS2':


· let the descriptor of V be ((l1,u1), ..., (ln,un));

· W is composed of

( 1) a descriptor ((1,1), (l1,u1), ..., (ln,un)),
( 2) the elements of V:


· the element selected by an index (i1, ... , in) in V is that selected by (1, i1, ... , in) in W.

c) The name N1 "built" from a name N, for some 'ROWS1', is determined as follows:

· N1 is a name {not necessarily newly created}, equal in scope to N and referring to the multiple value built {b}, for 'ROWS1', from the value referred to by N;

Case A: 'ROWS1' is 'row':


· the {only} subname of N1 is N;

Case B: 'ROWS1' is some 'row ROWS2':


· the subname of N1 selected by (1, i1, ... , in) is the subname of N selected by (i1, ... , in).
 
Next