_ (Attach Unit). This command will create unit objects in parallel only if level 1 contains a list. Thus 1 { ft

in m } _ produces { 1_ft 1_in 1_m } while { 1 2 3 } 'm' _ produces an error.

STO+. STO+ performs parallel list addition only if both arguments are lists. If one argument is a list and the other is not, STO+ appends the non-list argument to each element in the list.

STO-, STO*, STO/. These commands perform parallel processing if both arguments are lists, but fail otherwise.

Using DOLIST for Parallel Processing

Almost any command or user program can be made to work in parallel over a list or lists of data y using the DOLIST command. Use DOLIST as follows.

Level 1 must contain a command, a program object, or the name of a variable that contains a command or program object.

Level 2 must contain an argument count unless the level 1 object is a command that accepts parallel processing, or a user-defined function. In these special cases, Level 2 contains the first of the list arguments.

If level 2 was the argument count, then level 3 is the first of the argument lists. Otherwise, levels 2 through are the argument lists.

As an example, the following program takes three objects from the stack, tags them with the names a, b, and c, and displays them one after the other in line 1 of the display.

«→ a b c

«{ a b c } DUP « EVAL » DOLIST SWAP « →TAG » DOLIST

CLLCD 1 « 1 DISP 1 WAIT » DOLIST

»

»

F-4 Parallel Processing with Lists