Sequential Layout of Script-created Objects
erikhans08 at yahoo.com
Tue Dec 10 21:21:01 EST 2002
--- erik hansen <erikhans08 at yahoo.com> wrote:
> --- Dar Scott <dsc at swcp.com> wrote:
> > >> repeat with x = the number of controls of
> > group
> > >> "grpButtons" of stack down to 1
> > > or
> > > put (the number of controls of group
> > "grpButtons"
> > > of stack) into tot
> > > repeat with x = tot down to 1
> > > a little faster and you can see the total.
> > > from the Winkler book.
> > On my system the first takes 30 microseconds
> > and the second takes about
> > 100. I get similar results if I include the
> > entire loop in the timing.
> > Maybe this applies to an earlier 'card or the
> > book example is confusing.
> i was afraid something like this would happen.
> a recent DeVoto (co-author of The Book) posted
> that x is only calculated once. maybe that lets
> the former go faster. i still like seeing the
> total in a local variable when trouble
another thought: maybe size of the total has
something to do with it. the former might be
faster for 1000 loops slower for 10.
erik at erikhansen.org http://www.erikhansen.org
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
More information about the Use-livecode