Emptying an array
Pete
pete at mollysrevenge.com
Sat Feb 25 14:13:28 EST 2012
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 <bonnmike at gmail.com> 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 <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
> >
> _______________________________________________
> 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>
More information about the use-livecode
mailing list