Array key paths

Peter Haworth pete at lcsql.com
Tue Nov 12 17:30:19 EST 2013


Hi Monte,
I came across this on the list somewhere quite a while back, don't quite
remember who posted it.  I've found it really useful so yes, it should be
documented.

Pete
lcSQL Software <http://www.lcsql.com>


On Tue, Nov 12, 2013 at 1:46 PM, Monte Goulding <monte at sweattechnologies.com
> wrote:

> I'm doing some work with Trevor on Clarify 2 and I learned something I
> thought I'd share:
>
> Apparently multi-dimensional array keys can be specified using a
> numerically indexed array as a path. Here's an example:
>
> put "hello" into tTest[1][2]
> put  1,2 into tPath
> split tPath by comma
> put tTest[tPath] = "hello" -- true
>
> Apparently this was in some release notes from long ago. I can't see
> anywhere in the dictionary it might be. If anyone knows where it's
> documented in current docs then I won't send a docs bug about it. Is there
> a general discussion of arrays anywhere?
>
> Cheers
> --
> Monte Goulding
>
> M E R Goulding - software development services
> mergExt - There's an external for that!
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list