LAUNCH

Syntax

LAUNCH name

(LAUNCH name name name ...)

Explanation

LAUNCH launches a Logo procedure to be run in the background. This procedure runs simultaneously with other Logo procedures. Since a background procedure is executed at the end of the execution of every Logo statement, these procedures should be kept as small as possible.

Background procedures may unexpectedly alter the value of any Logo variable.

See also HALT.

Example

The procedure below sends turtle 1 to a random location on the screen every time it is called. If this procedure is installed as a background procedure, the turtle creeps across the screen while letting you enter commands and other procedures.

TO CREEP


 * LOCAL "TELL.LIST


 * MAKE "TELL.LIST WHO


 * TELL 1


 * SETPC 2 ST


 * SETH HEADING + (RANDOM 60) - 30


 * FORWARD RANDOM 20


 * TELL :TELL.LIST

END

? LAUNCH "CREEP

? FD 30

? (HALT)