Question (more or less) about arrays

Richard Gaskin ambassador at fourthworld.com
Tue Apr 3 10:11:23 EDT 2007


Mark Smith wrote:

 > On 3 Apr 2007, at 10:47, jbv wrote:

 >> In order to check if array "var" contains any element,
 >> the following test must be used instead :
 >>     if the keys of var = empty then
 >>
 >> I was just wondering if you guys would find this behaviour
 >> "normal" ?
...
 > JB, there are various requests in place at the qa center for
 > enhancements to both the implementation and documentation of arrays
 > in Rev (type 'array' into the search field, and you'll see them).
 >
 > As it stands, Revs arrays are just different from normal variables,
 > and what you've found is the normal behaviour, so maybe you might
 > want to vote for a documentation update at least.

But here's the tough question:  if "var" contains an array, then no 
valid data can be returned by accessing it without the name of one of 
its keys.  So what should "var" return when checked directly?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com




More information about the use-livecode mailing list