Counting problem
Mike Bonner
bonnmike at gmail.com
Fri May 24 18:20:34 EDT 2013
Does NOT work for me, tried 5.5.1 to 6.0.1 (community) and it just does
random freakishness. On osx ML.
On Fri, May 24, 2013 at 4:16 PM, Peter Haworth <pete at lcsql.com> wrote:
> On Fri, May 24, 2013 at 2:56 PM, <dunbarx at aol.com> wrote:
>
> > I know I am going to feel like a dope, but why does the first script
> > always properly give ten counts in the array variable "counter", but the
> > second can give anywhere from five to sixteen, and maybe others?
> >
> >
> >
> > on mouseUp
> > put "a,b,c,d,e,f,g,h,i,j" into temp
> > repeat 10
> > get any item of temp --always gives ten
> > add 1 to counter[it]
> > end repeat
> > end mouseUp
> >
> >
> > on mouseup
> > put "a,b,c,d,e,f,g,h,i,j" into temp
> > repeat 10
> > add 1 to counter[any item of temp]
> > end repeat
> > end mouseUp
> >
> >
> >
> >
> > I have deconstructed the problem line by watching the array in the
> > debugger on the sly after each iteration. It goes crazy, sometimes the
> > count of a particular char going DOWN.
> >
>
> This isn't going to help, but the second script works just fine for me, the
> total of the array key values always adds up to 10 as it does with the
> first script.
>
> LC 5.5.4 on OSX 10.7.4.
>
> Pete
> lcSQL Software <http://www.lcsql.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