Arrays in Rev

Alex Tweedly alex at tweedly.net
Fri Dec 10 14:44:54 EST 2004


At 11:13 10/12/2004 -0800, Richard Gaskin wrote:

>Mark Brownell wrote:
>>This thing is not a real array within an array, it just acts like one.
>
>I hate to reinforce any perceptions of my curmudgeonliness, but for the 
>benefit of newcomers here it may be useful to remind folks that while this 
>indexed array is scripted, Rev's built-in associative arrays are just as 
>"real" as associative arrays in any other language (and sometime more 
>useful than strictly numerically indexed ones).

It's "real", but it is NOT *within* another array.
In Rev, you cannot do something equivalent to

put "abc" into a[1]
put  "def" into a[2]

put "ghi" into b["z"]
put a into b["y"]

which you can (with different syntax) in Perl, Python, (I think) Ruby, ....

I'm not particularly claiming that it's good practice to do so :-)   - but 
you can do it.

-- Alex.


More information about the use-livecode mailing list