joining arrays



On 12/27/06, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 12/26/06, pol <linux_milano at yahoo.it> wrote:
>
> > How to fill the array k[-1,-2,-3,1,2,3] with values from the two arrays:
> > kl[-1,-2,-3]  and kr[1,2,3]  ?  k[0] should be kept unassigned.
>
> kl : [-1, -2, -3];
> kr : [1, 2, 3];
> k : append (kl, kr);
>  => [- 1, - 2, - 3, 1, 2, 3]

Is that what you had in mind, Pol?  My guess is that it's more like

      ( for i from -3 thru -1 do k[i]:kl[i], for i from 1 thru 3 do k[i]:kr[i] )

It should be possible to do this in general with arrayinfo and
arrayapply, but it gets messy because you cannot use arrayapply on the
left-hand side of an assignment.

             -s