Emptying an array

Mike Bonner bonnmike at gmail.com
Sat Feb 25 13:39:42 EST 2012


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 <pete at mollysrevenge.com> 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 <bonnmike at gmail.com> wrote:
>
> > just put empty into the array. Fast and easy.
> >
> > On Sat, Feb 25, 2012 at 11:06 AM, Pete <pete at mollysrevenge.com> 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
> > > use-livecode at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > 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
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list