alan.kay at squeakland.org
Sun Dec 12 11:30:24 PST 2004
See below ...
At 10:42 AM 12/12/2004, Shashank Date wrote:
>Alan Kay wrote:
>>Generally speaking, 5th graders get along very well without a repeat tile
>>(but more and more older children are using etoys and thus we will
>>include a loop construct some time this year).
>Great ! Yes, we were doing fine without the repeat tile so far, but now
>our kids (6th and 7th graders) want to do more :-)
>>But all the different kinds of loops are easy to make from two scripts,
>>one to initialize, and one to do the loops and terminate. Use a variable
>>if you are doing a "for" type loop.
>>So for player foo, "For i from 1 to 100 do mumble" would be:
>> i <- 1
>> foo start script loopBody
>And here we had to add:
> foo stop script loopInit
>without which the clock kept ticking and the loopInit scipt kept executing
>over and over again. (There is an implicit infinite-loop on all the scripts).
No, there isn't. E.g. if you just say in another script
this will fire this script once (this is why there is an explicit "start
script" to start a script looping).
If you want to do this by hand, just click on the (!) on the left top edge
instead of the clock.
>> Test foo's i > 100
>> Yes foo stop script loopBody
>> No mumble
>> foo's i increase by 1
>>This is somewhat cumbersome, but is quite clear about what it does and
>>when it does it.
>Worked like a charm ! Thanks for the hint.
>>It has not come up as an issue with 5th graders because they stuff that
>>we are encouraging them to do has either unbounded looping (the normal
>>case) or the looping is stopped by some test of an external condition (as
More information about the Squeakland