jed-users mailing list

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

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


Hi,

I assume the following (very surprising!) behavior is intentional?

variable a, b;

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

printf ( "%d\n", _eqs ( a, b ) );    % prints 1

Is this behavior documented anywhere?

A more detailed example is below.
I expect "b" and "c" to be equal, but they are not.

Thanks!

-Parke

----

variable a, b, c, d;

a = [0, 1];

b = [a, a];

c = Array_Type[2];
c[0] = a;
c[1] = a;

printf ( "length b  %d\n", length (b) );
foreach d ( b )  { printf ( "%s ", string (d) ); }
printf ("\n");

printf ( "length c  %d\n", length (c) );
foreach d ( c )  { printf ( "%s ", string (d) ); }
printf ("\n");

%  output
%    length b  4
%    0 1 0 1
%    length c  2
%    Integer_Type[2] Integer_Type[2]
_______________________________________________
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]