determining array lengths
janschenkel at yahoo.com
Sat Sep 21 16:21:01 CDT 2002
I looked into this a while ago. My solution was:
1) If the second dimension is fixed (always NN
elements), you can suffice by saying:
put (the number of lines of the keys of tArray / NN)
2) If however NN is variable, you can get it with the
put the keys of tArray into tKeys
split tKeys using return and comma
put the number of lines of the keys of tKeys
I know it looks convoluted, but it works, even if the
second dimension varies.
Hope this helped,
(You can find the entire thread at the URL:
--- Brad Allen <BradAllen at mac.com> wrote:
> After looking around in the documentation, I haven't
> been able to
> find a simple function to determine the number of
> keys for a given
> array dimension. Do I need to parse the output of
> the keys function
> for this, or have I overlooked something in the
> I was hoping the number function might do it, as in
> the number of keys in myArray
> The expected output would be something like
> [100,50], to indicate the
> dimensions of the array.
> The "number of lines in the keys of myArray" only
> works for
> one-dimensional arrays.
> use-revolution mailing list
> use-revolution at lists.runrev.com
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
More information about the use-livecode