|MWForum Message||[Date Index] [Threads] [Authors] [Attachments] [Subscribe]|
Attached is a "simple" example of the use of parallel
START initially has LAUNCH commented out.
EVERYONE makes each turtle in turn run the proc. ACTION
If you remove the comment marks, each turtle's action is LAUNCHED
i.e. converted into and independent process. EVERYONE then doesn't wait
until t1's process stops before launching the next.
I've made ACTION a recursive procedure since it is an easy way to stop
an individual turtle without affecting the rest.
The START button remains down while the program is running so you can stop the program by clicking START.
If you use FOREVER as a public procedure then STOPALL or CANCEL are
The alternative method is to use the BACKPACK. I've programmed ONCLICK but you need to alter ONCOLOR. Perhaps those who are actually teaching beginners can add something more enlightening. Mike
----- Original Message ----- From: "Burke, Bridget -CKJH" <BRIDGETBU@xxxxxxxxxxxxxxx>
Sent: Tuesday, October 11, 2005 7:32 PM
Subject: RE: Maze and keys
Thanks, Mikes for the insight on running parallel processes. Now, how do I teach this concept? Does anyone have a simpler example for show students? Do programmers use Main and Start as standards in writing complex programs?
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.