Arrays vs Lists

Mike McManus mcmanusm at
Thu Dec 5 09:51:00 EST 2002

Thanks to both Dar and David for your inputs. Gives me something to 
think about in deciding to use the one or the other. Has allowed me to 
get a better handle on it. I was starting to understand and use arrays 
a lot more when I was doing more perl. But it is so easy to through a 
list together in Rev., that sometime I wonder if it's worth the effort 
to create an array, especially since I seem to have a lot of trouble 
creating and using them in Rev(Custom Properties to be specific!). But 
apparently I should give it some thought under the right conditions

As for Dar's question about a list. IME, a list is an ordered delimited 
groups of words or phrases. The delimiter is usually, but not always a 
comma. I suspect that is not correct when you consider programming in 
general. But having spent a lot of time in Hypercard. That is what I 
consider one.  You can delimit with anything, just be sure it doesn't 
pop up in you list items.

On Wednesday, December 4, 2002, at 04:08  PM, David Vaughan wrote:

> On Thursday, December 5, 2002, at 12:32 AM, Mike McManus wrote:
>> I have seen a lot about arrays lately here. So I am wondering.
>> It seems very simple to address item 2 of line 4 or some such. Or to 
>> just repeat "for each line". Not sure what the effective result is of 
>> either creating it as an array or splitting it into an array.
> As an afterthought triggered by this question and the responses from 
> Dar and me, every couple of months this list receives a query along 
> the lines of "my repeat with i = 1 to n loop is very slow" to which 
> several will chorus "use repeat for each" (as Mike mentions).
> So it may be worthwhile mentioning the otherwise obvious inference 
> from the array discussion that one way to deal with a large list where 
> you want access by line number is first to use RFE to put it into an 
> array with enumerated keys, and Bob's your uncle. Slower than RFE for 
> a single cycle but fast for repeated direct access to lines not 
> otherwise keyed; e.g. indexing into a lookup list via a calculated 
> sequence number.
> cheers
> David
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the Use-livecode mailing list