Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

Bob Sneidar bobsneidar at iotecdigital.com
Wed Aug 27 10:54:04 EDT 2014


The second command generates an error, just like adding one + 1. But that brings up an interesting point: Can an indexed array contain associative arrays and vis versa? Nice little pickle. And how do you tell, or is it important necessarily to tell?

Bob S


On Aug 20, 2014, at 08:23 , jbv at souslelogo.com wrote:

> I was thinking :
> set the indexedarray of myArray to true
> set the indexedarray of myArray to false
> 
> but then what happens when you switch that property from true
> to false for the same array within a handler ?
> 
> Same question for "{}" notation : what happens when the same
> handler contains these 2 successive lines :
>  add 1 to myArray{10}
>  add 1 to myArray[10]
> 
> Best
> jbv
> 
>> How about using {} instead of []?
>> 
>> Bob S
>> 
>> 
>> On Aug 20, 2014, at 07:24 , Richard Gaskin
>> <ambassador at fourthworld.com<mailto:ambassador at fourthworld.com>> wrote:
>> 
>> So if we were to propose that LiveCode add indexed arrays, the first thing
>> we'll want to do is come up with the syntax for specifying those when
>> those are what we want, ideally allowing all other usage to continue using
>> associative arrays as they have all these years.
>> 
>> Suggestions on what that syntax should look like?
>> 
> 
> 
> _______________________________________________
> 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