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@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: problem with PD instruction
From: "Daniel Ajoy" <da.ajoy@xxxxxxxxx>
Date: Sun, 05 Nov 2006 23:21:57 -0500

On 5 Nov 2006 at 10:20, zehava wizman wrote:

> Hello Forum!
> 1.PD is a simple instruction, and I had not problem with it till  
> now. Here attach a project with forever, the monkey procedure     
> is not drawing a line while the monkey is moving, only when I     
> enter PD within the forever instruction, its works (monkey1's     
> procedure) WHY?                                                   
>
>                        thanks, Zehava Wizman

The thing is that "forever" has an implicit "launch". That means
that what's between the brackets is run in parallel with what
follow the closing bracket. eg. "pu"

to monkey
pd 
forever [ Setsh 14 wait 1 
fd 10 
setsh 15 wait 1 
fd 10 
 Setsh 16 wait 2 
fd 10 
setsh 17 wait 1 
fd 10
Setsh 18 wait 1 
fd 10 
setsh 19 wait 1 
fd 10 
setsh 13]
pu  ; <----- Runs in parallel with the code above.
end

The net effect is that "pu" is run almost immediately after the 
instructions between the brackets start running.


Daniel
OpenWorld Learning




  • Previous by thread: problem with PD instruction
  • Next by thread: Re: problem with PD instruction

  • 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