Split Command

Martin Baxter mb.ur at harbourhost.co.uk
Tue Feb 14 16:39:56 EST 2006


Gregory Lypny wrote:
> Hello everyone,
> 
> If I create an array from a list field using the split command and  
> return as the only delimiter, am I guaranteed that the number of each  
> line becomes its own array element key?  That is, does line 1 become  
> array element 1, line 2 array element 2, and so on?  This seems to be  
> the case in a couple of experiments I've done.
> 
> Gregory

Yes, that's my experience, and I've done that a lot. But in case you are 
expecting the array keys to be numerically ordered, note that you should 
not rely on that. If you loop through the elements later you may find 
the order of keys is not what you are expecting, especially if you have 
edited the array in the meantime.

Martin Baxter



More information about the use-livecode mailing list