ABC of arrays

Richard Gaskin ambassador at fourthworld.com
Wed Apr 1 21:47:27 EDT 2015


Ralph DiMola wrote:

 > Mike,
 >
 > Well explained...

Agreed.  I think he gets Explaintion of the Month for that.  Sure, the 
month just started, but that was good.

 > Just when I learned the power of LC array the fact that a box
 > could only contain a data item OR other boxes is what bit me.
 > I actually coded up a mini storm and it wasn't until I start
 > testing that I figured this out. At the time I couldn't think
 > of a reason why LC couldn't be changed so a box could contain
 > a data item AND other boxes. Later on I realized that it would
 > break old code. Other than that it would be an asset to the
 > LC array.

I'm not sure it's just backwards compatibility, but maybe just 
maintaining logical consistency.

Right now every array element is a name-value pair, in which the value 
can be anything - text, binary, or even another array.

If we allow text and binary values to be stored and accounted for 
separately from array values, then that would mean that some array slots 
have two values while others have just one.

Definitely calls for some clarity in the introductory docs. Like Mike 
said, when you open the box you either get a value or another box.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  ____________________________________________________________
  Ambassador at FourthWorld.com        http://www.FourthWorld.com




More information about the use-livecode mailing list