LAUNCH
Syntax LAUNCH runlist 
 
Explanation LAUNCH launches a Logo run list to be run in the background. This run list runs simultaneously with other Logo procedures. The output of LAUNCH is an ID number which can be used with the HALT command to halt a running background procedure.

Background procedures may unexpectedly alter the value of any Logo variable. A few system variables, however, are treated differently. The values of STANDARD.INPUT, STANDARD.OUTPUT, and CASE are local to any procedures started with the LAUNCH command or run by clicking a menu choice, a control, a turtle, or a bitmap. Such procedures obtain their own copy of these variables. Setting one of these variables inside a LAUNCHed procedure does not affect the global setting. This makes it possible for a LAUNCHed procedure to, for example, change the value of STANDARD.OUTPUT to a file or even an Internet channel without affecting the STANDARD.OUTPUT channel of another procedure.

Logo treats every procedure not run by user input to the Listener or called by such a procedure as a background procedure.

Example The procedure below will send turtle 1 to random locations on the screen. If this procedure is launched as a background procedure, the turtle will creep along the screen while allowing you to enter commands and run other procedures. Note that the procedure does not use the TELL command, because this command alters the TELL list which is used by all Logo procedures.

TO CREEP 
    ASK 1 [SETPC 2 ST] 
    ASK 1 [SETH HEADING + (RANDOM 60) - 30] 
    ASK 1 [FORWARD RANDOM 20] 
    CREEP
END


TopIndex