Arrays vs Lists
David Vaughan
dvk at dvkconsult.com.au
Wed Dec 4 16:14:01 EST 2002
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 lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list