determining array lengths
janschenkel at yahoo.com
Sat Sep 21 17:00:02 EDT 2002
My apologies, Brad. I only realised afterwards that my
answer was off by the length of a small
Richard is right: have a look at the extents function.
My solution does work for determining the number of
lines if the keys for the columns are non-numeric.
--- Jan Schenkel <janschenkel at yahoo.com> wrote:
> Hi Brad,
> 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 /
> 2) If however NN is variable, you can get it with
> following trick:
> 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
> second dimension varies.
> Hope this helped,
> Jan Schenkel.
> (You can find the entire thread at the URL:
> --- Brad Allen <BradAllen at mac.com> wrote:
> > After looking around in the documentation, I
> > 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
> > documentation?
> > I was hoping the number function might do it, as
> > 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.
> > Thanks...
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> 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