using "split" to build multi-dimensional arrays ?

jbv jbv.silences at Club-Internet.fr
Tue Jun 7 07:44:50 EDT 2005


Hi list,

When I run the following script :

  put "a,b,c,d,e" into L
  repeat with j=1 to 2
    repeat with i=1 to 5
      put item i of L into W[j,i]
    end repeat
  end repeat
  combine W using cr and comma
  put W

I get this :
1,1,a
1,2,b
1,3,c
1,4,d
1,5,e
2,1,a
2,2,b
2,3,c
2,4,d
2,5,e


------
but when I add the 3 following lines :

put W into W1
split W1 by cr and comma
put W1[2,5]

I get empty...

Does that mean that "split" can't be used to build
2 dimensional arrays ?

Thanks,
JB




More information about the use-livecode mailing list