LOGO Commands 12
These command descriptions were adapted from the Berkeley Logo User
Manual, Copyright 1993 by the Regents of the University of
California.
WORKSPACE CONTROL
-----------------
TRACE contentslist
command. Marks the named items for tracing. A message is printed
whenever a traced procedure is invoked, giving the actual input
values, and whenever a traced procedure STOPs or OUTPUTs. A
message is printed whenever a new value is assigned to a traced
variable using MAKE. A message is printed whenever a new property
is given to a traced property list using PPROP.
UNTRACE contentslist
command. Turns off tracing for the named items.
STEP contentslist
command. Marks the named items for stepping. Whenever a stepped
procedure is invoked, each instruction line in the procedure body
is printed before being executed, and Logo waits for the user to
type a newline at the terminal. A message is printed whenever a
stepped variable name is "shadowed" because a local variable of
the same name is created either as a procedure input or by the
LOCAL command.
UNSTEP contentslist
command. Turns off stepping for the named items.
EDIT contentslist
ED contentslist
(EDIT)
(ED)
command. If invoked with an input, EDIT writes the definitions
of the named items into a temporary file and edits that file, using
your favorite editor as determined by the EDITOR environment
variable. If you don't have an EDITOR variable, edits the
definitions using jove. If invoked without an input, EDIT edits
the same file left over from a previous EDIT or EDITFILE instruction.
When you leave the editor, Logo reads the revised definitions and
modifies the workspace accordingly. It is not an error if the
input includes names for which there is no previous definition.
If there is an environment variable called TEMP, then Logo uses
its value as the directory in which to write the temporary file
used for editing.
Exceptionally, the EDIT command can be used without its default
input and without parentheses provided that nothing follows it on
the instruction line.
DATA STRUCTURE PRIMITIVES
=========================
CONSTRUCTORS
------------
LISTTOARRAY list (library procedure)
(LISTTOARRAY list origin)
outputs an array of the same size as the input list, whose members
are the members of the input list.
ARRAYTOLIST array (library procedure)
outputs a list whose members are the members of the input array.
The first member of the output is the first member of the array,
regardless of the array's origin.
PREDICATES
----------
MEMBERP thing1 thing2
MEMBER? thing1 thing2
if "thing2" is a list or an array, outputs TRUE if "thing1" is EQUALP
to a member of "thing2", FALSE otherwise. If "thing2" is
a word, outputs TRUE if "thing1" is a one-character word EQUALP to a
character of "thing2", FALSE otherwise.
RECEIVERS
---------
READLIST
RL
reads a line from the read stream (initially the terminal) and
outputs that line as a list. The line is separated into members as
though it were typed in square brackets in an instruction. If the
read stream is a file, and the end of file is reached, READLIST
outputs the empty word (not the empty list). READLIST processes
backslash, vertical bar, and tilde characters in the read stream;
the output list will not contain these characters but they will have
had their usual effect. READLIST does not, however, treat semicolon
as a comment character.
READWORD
RW
reads a line from the read stream and outputs that line as a word.
The output is a single word even if the line contains spaces,
brackets, etc. If the read stream is a file, and the end of file is
reached, READWORD outputs the empty list (not the empty word).
READWORD processes backslash, vertical bar, and tilde characters in
the read stream. In the case of a tilde used for line continuation,
the output word DOES include the tilde and the newline characters, so
that the user program can tell exactly what the user entered.
Vertical bars in the line are also preserved in the output.
Backslash characters are not preserved in the output, but the
character following the backslash has 128 added to its
representation. Programs can use BACKSLASHEDP to check for this
code. (Backslashedness is preserved only for certain
characters. See BACKSLASHEDP.)
Mtht420