Question (more or less) about arrays

Dave dave at looktowindward.com
Tue Apr 3 11:50:59 EDT 2007


On 3 Apr 2007, at 16:52, jbv wrote:

>
>
> Richard Gaskin a *crit :
>
>>>
>>> One option is to return the same thing as when using "the keys of  
>>> var",
>>> IOW the list of the keys of the array...
>>
>> How would one distinguish between an array and a non-array which
>> contains any return-delimited list?
>
> Well, actually, my problem was to detect if a var was empty or not, no
> matter if it was an array or a regular variable.
> At least my proposition solves my original problem.
>
> As for your question, may be could there be a command named "the  
> arrayNames"
> that would list the variables containing arrays ?
> Therefore we could use some simple test such as :
>     if my var is not empty and my var is among the arrayNames
>
> I'm sure someone will come up with a better idea...

Maybe it would be better to just add a "type" function?

e.g. Something like:

if revType(myVar) = "Array" then
.............................


All the Best
Dave





More information about the use-livecode mailing list