Question regarding arrays...
Lynch, Jonathan
BNZ2 at CDC.GOV
Thu Dec 30 16:37:48 EST 2004
Interesting - thanks!
Associative arrays should be perfect for what I need.
What would be the advantage to indexed arrays over associative arrays -
are they more quickly accessed?
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Richard
Gaskin
Sent: Thursday, December 30, 2004 4:19 PM
To: How to use Revolution
Subject: Re: Question regarding arrays...
Lynch, Jonathan wrote:
> I thought I read in past postings that Rev did not support 3D arrays -
> that it only supported up to 2D arrays.
>
> This morning I tested that, and seemed to have no problem with 3D
> arrays. I am sure I am just making an ignorant mistake - either in my
> testing or in what I gathered from the postings I read - but could
> someone clarify the issue?
The issue is with "2D" and "3D" nomenclature, which can be misleading
when trying to understand working with arrays in Rev.
Rev currently uses associative arrays, which allow a string to be a
label associated with a data element.
That label string can be numeric giving you ordered elements, and can
can include commas to give you some of the convenience of
multi-dimensional arrays.
Just remember it's always a string: myArray[1,2] is the same as
myArray["1,2"].
Associative arrays are flexible, useful in a great many circumstances
that indexed arrays might be harder to work with.
There is a request in Bugzilla for fully-dimensional indexed arrays, and
that'll be nifty when it's there, but in the meantime hopefull
associative arrays will continue doing what you need.
--
Richard Gaskin
Fourth World Media Corporation
__________________________________________________
Rev tools and more: http://www.fourthworld.com/rev
_______________________________________________
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