Nice Leonardo da Vinci Bezier, just a click away

Peter M. Brigham, MD pmbrig at gmail.com
Fri Nov 4 08:51:17 EDT 2011


On Nov 3, 2011, at 4:26 PM, stephen barncard wrote:

> Answering my own dumb question:
> 
> on deleteAllGrcs
> 
>      put the number of grcs in cd 1 of stack "leo" into ngcs
> 
>      repeat with n = ngcs down to 1
> 
>            delete grc n of cd 1 of stack "leo"
> 
>      end repeat
> 
> end deleteAllGrcs
> 
> 
> the "down to" form is used in the loop is as I am using "the number of" to
> determine the existing grcs in a container (is there any other way?) and
> "the number of" order would change every time the first item is deleted..

...or just:

on deleteAllGrcs
   put the number of grcs in cd 1 of stack "leo" into nbrGrcs
   repeat nbrGrcs times
      delete grc 1 of cd 1 of stack "leo"
   end repeat
end deleteAllGrcs

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig





More information about the use-livecode mailing list