I'm using "if theArray is not an array".  I also just discovered the
extents property of an array which gives you the lowest and highest key
value at each level of an array, as long as the keys are numeric.  Very
useful for some code I'm writing right now.
Pete

On Sat, Feb 25, 2012 at 10:39 AM, Mike Bonner <[email protected]> wrote:

> To check for an empty array you can also do
> if (the keys of sDataA) is empty then...
>
>
>
> On Sat, Feb 25, 2012 at 11:27 AM, Pete <[email protected]> wrote:
>
> > Thanks Mike.  For some reason, I had it in my head that wouldn't work but
> > it clearly does.  I think I may have got confused with trying to test if
> an
> > array is empty with "if theArray is empty", which retruns true even if
> > there are keys in the array.
> > Pete
> >
> > On Sat, Feb 25, 2012 at 10:17 AM, Mike Bonner <[email protected]>
> wrote:
> >
> > > just put empty into the array. Fast and easy.
> > >
> > > On Sat, Feb 25, 2012 at 11:06 AM, Pete <[email protected]> wrote:
> > >
> > > > To remove all the keys of an array, I'm currently using delete local
> > > > theArray[thekey] in a repeat loop for each line in the keys of the
> > array.
> > > > Is there a better/recommended way to do this?
> > > > Thanks,
> > > >
> > > >
> > > > --
> > > > Pete
> > > > Molly's Revenge <http://www.mollysrevenge.com>
> > > > _______________________________________________
> > > > use-livecode mailing list
> > > > [email protected]
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > [email protected]
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> > >
> >
> >
> > --
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > [email protected]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to