Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxx
Subject: When or if
From: "Daniel Ajoy" <dajoy@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Nov 2002 08:35:42 -0500

On 12 Nov 2002 at 21:42, Trish Sims wrote:

> HelloAll
> 
> I've been teaching year 8's (age 14) to use MicroWorlds. Lots of very
> successful projects but I'm having difficulty understanding and explaining
> the difference between proceedures that include
> 
> when [touching? "t1 "t2] etc
> 
> and
> 
> if [touching? "t1 "t2] etc
> 
> These procedures are used to especially in races to program colour or to
> determine when/if turtles touch. Any suggestions would be greatly
> appreciated.
> 
> Trish Sims
> Strathmore Secondary College


"*When* checks continually to see if the condition in the first set of 
brackets is true. "
http://mia.openworldlearning.org/ant_hill/ant_hill_5.htm

... and it does so independently of the normal flow of the program. This
independent/continual check starts when the flow of the program reaches
the *when* primitive.

*If* only checks the condition when the flow of the program reaches the
*if* primitive. (image attached)

Daniel
OpenWorld Learning

Attachment: if-when.gif
Description: GIF image


  • Previous by thread: When or if
  • Next by thread: When or if

  • 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.


    © copyright 2001 - 2008