jed-users mailing list

[2014 Date Index] [2014 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] Quirky one dimensional array creation behavior.


Parke <parke.nexus@xxxxxxxxx> wrote:
> I assume the following (very surprising!) behavior is intentional?

Yes, it is intentional.  A change was introduced in slang version
pre1.4.6-15 such that if A and B are arrays, then the array [A, B]
is a 1-d array composed of the elements of A and B.

> variable a, b;
>
> a = [ 1,2,3,4 ];
> b = [ [1,2], [3,4] ];

With that change, a and b are equal.

> Is this behavior documented anywhere?

It should be, but unfortunately it is not aside from the changes.txt
file.

A useful alternative is to use a list of arrays, e.g.,

  A = [1:100];
  B = [200:400];
  L = {A, B};

Thanks,
--John
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2014 date index] [2014 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]