mseq
mseq changes the number of elements in every region of one direction of the open part.
Syntax
mseq direction d1 d2 ... dn [ ; ]
direction:i,jork.d1todn: signed whole numbers, one for each region of that direction. Each is added to that region’s element count. A direction withn + 1index entries hasnregions.
The closing ; may be left out.
What it does
mseq gives each region a new element count and leaves the partitions and coordinates alone. The result is the same as writing the new counts into the part’s own index list.
When James applies it
When it is read, in the Part phase. mseq is not one of the 21 steps. James folds it into the part’s index list at once, so every later command sees the new element counts.
Rules James adds
mseqreads every number it finds, up to the;or the first word that is not a number, and then compares the count with the number of regions. Too many values and too few both give E0406.updateis not supported in this version (E0100), and James reports the coordinate equations as not recognized (E0105). Once they are supported,mseqandlmseqafter them will be refused, not ignored.
Diagnostics
- E0406: the direction is not
i,jork, or the number of values is not the number of regions.
Example
The script tests/corpus/166-mseq-doubles-j/input.tg, which make test runs:
c mseq j adds two elements to each j region, so 1 3 5 becomes 1 5 9.
block 1 3;1 3 5;1 2;0 1;0 1 2;0 1;
mseq j 2 2
endpart
The j list 1 3 5 has two regions of two elements. Adding 2 to each makes them four, and the IR shows the j list as [1 5 9]. The part has twice as many elements along j.