Well I never!

Andre Garzia andre at andregarzia.com
Fri Mar 27 19:30:58 EDT 2009


James,

a quick answer, I think arrays in the form of [i,j] are not
multidimensional, they single dimension with a key that is the concatenation
of i and j. If you get the keys of the array, you'll see they all echoed
back to you. It's a fake two dimensional array like you named your keys 1-0
1-1 1-2... no matter your keys, it is still a single dimension.

Now, when we talk about [1][2] then we're playing with arrays that can
contain other arrays, like little russian dolls (matrioshka or something, I
can't spell english or russian or portuguese). If you request the keys of
the array, you'll see only the ones available at that depth, if you get an
element, it might be an array with their own set of keys. Imagine the cute
russian dolls but give them a twist where instead of only putting a single
doll inside the other, you could put one, two or more side by side into the
other (I should have made a better analogy using easter eggs containing
multiple eggs). So each doll can contain other dolls (plural) and each of
the dolls can contain more dolls (doubleplusplural).

Let me try another analogy, one that will only make sense for those of you
that visited places like Brazil, India, Africa, Asia and also watched the
best show on BBC.

An Array is a public Bus. You could fit a lot of things inside a bus, but
still they would occupy their allocated space inside the bus, no matter how
many people you put inside a bus and anyone that's been to a latin country
can say that we can fit a lot of things inside a bus, it still a single bus.
Even if it says it fits 55 passengers and you insert 456 guys + chickens +
pigs + sand + a whole guerrila cell, it still a single bus carrying a lot of
stuff. You can fake many dimensions in a bus, and believe me people try, so
you put the chickens all in the back playing backgammon with the pigs, you
put the sand between them and the guerrila cell on the middle and you cram
456 guys at the front because the smell of pigs cheating is horrible. Even
if you organize them, it still a single bus and when you try to check the
smell of pigs (the keys!) you still can sense it! So, no matter how well you
organize your keys, if they fit inside a [bus], they are a single dimension.

Now, imagine the TARDIS (yes, we all love Doctor Who). The TARDIS is a space
ship that is bigger on the inside, it looks like a telephone box but inside
it is as big as a whole building. You can put other TARDISes inside it,
because they look like a little telephone box but inside them but inside
they are palaces. Now, if you want to put the 456 guys + chikens + pigs +
sand + a whole guerrila cell, then it is easy, you can put the pigs in their
own TARDIS, the chikens and sand in another one, the guerrila guys in a
third and pack the 456 guys in groups of 20 each receiving their own TARDIS,
then you put all those dozen TARDISes inside a single one. You can't sense
the smell from the pigs because they are in another place, you can hear bad
communist jokes because the guerrila guys are in another (jokes like: how
many AIG Execs takes to change a lightbulb?). Each of those 456 guys is in
their own tidy pack with no interference from the others and it all fit
inside a single array variable!

I hope this techinical explanation helps.

:D

Andre

On Fri, Mar 27, 2009 at 3:47 AM, James Hurley <jhurley0305 at sbcglobal.net>wrote:

> Watching the web demo today I witnessed a funny thing. It looked like this
>
> twoDimenArray ["stuff"] ["moreStuff"]
>
> I said to myself, So THIS must be the two dimensional arrays I've heard
> about.
>
> Now silly me, I've been using
>
> oneDimenArray[i,j]
>
> Which I suppose now must be one dimensional arrays where the keys are lists
> of two parameters. (But it sure looks like the two dimensional arrays I held
> near and dear to my heart, low these many years.)
>
> Little help  please:
>
> What is the relative advantages of:
>
> aArray ["a"] ["b"]
>
> and
>
> bArray ["a", "b"]
>
> And  what are the keys of aArray?
>
> I need to pay more  attention of what Run Rev is up to.
>
> Jim Hurley
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list