Persistent Array Designation

Ben Rubinstein benr_mc at
Fri Mar 22 04:45:15 EST 2002

on 21/3/02 9:18 PM, Rob Cozens at rcozens at wrote:

> In the script changes I proposed to Ben
>> if fromUse then put aInfo into aUseInfo else put aInfo into aImproveInfo
> This puts a variable with a list of associated keys into a nonKeyed
> variable (and in other parts of the script, vice versa).  I frankly
> don't know if the index keys are maintained correctly in the process.
> This brings up several questions:
I don't think this is correct; I think it makes a copy of the array object,
and puts this copy into the destination variable.  I don't think that there
is a concept of a 'nonKeyed' variable.

> 1.  Will the handler maintain the key notation when aInfo is put into
> aUseInfo and aUseInfo is then put into aInfo?

as above - both variables point at separate array objects.  The information
(keys and all) is in the array; which variable points at the object is not

> 2.  Is the key list maintained separately from the arrayed variable
> (as opposed to maintaining the variable as a delimited list)?

as above, I think the concept of an 'arrayed variable' is spurious.  The
value of a variable in Rev is either a string or an array.  An array object
maintains the data, including keys and values.

> 3.  If we're dealing with a delimited list in actuality, is there
> potential conflict between the delimiter used by the MetaCard engine
> and some character I might choose as my own delimiter?

Arrays are actually hashtables, not simply delimited lists.  I don't believe
this problem can arise.
  Ben Rubinstein               |  Email: benr_mc at
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600        |  Fax  : +44 (0)1273-728866

More information about the use-livecode mailing list