[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Workspace Management

7.1 Procedure Definition  
7.2 Variable Definition  
7.3 Property Lists  
7.4 Workspace Predicates  
7.5 Workspace Queries  
7.6 Workspace Inspection  
7.7 Workspace Control  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 Procedure Definition

to  
define  
text  
fulltext  
copydef  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

to

 
TO procname :input1 :input2 ...			(special form)

command. Prepares Logo to accept a procedure definition. The procedure will be named procname and there must not already be a procedure by that name. The inputs will be called input1 etc. Any number of inputs are allowed, including none. Names of procedures and inputs are case-insensitive.

Unlike every other Logo procedure, TO takes as its inputs the actual words typed in the instruction line, as if they were all quoted, rather than the results of evaluating expressions to provide the inputs. (That's what "special form" means.)

This version of Logo allows variable numbers of inputs to a procedure. After the procedure name come four kinds of things, *in this order*:

 
	    1.   0 or more REQUIRED inputs    :FOO :FROBOZZ
	    2.   0 or more OPTIONAL inputs    [:BAZ 87] [:THINGO 5+9]
	    3.   0 or 1 REST input            [:GARPLY]
	    4.   0 or 1 DEFAULT number        5

Every procedure has a MINIMUM, DEFAULT, and MAXIMUM number of inputs. (The latter can be infinite.)

The MINIMUM number of inputs is the number of required inputs, which must come first. A required input is indicated by the

 
:inputname

notation.

After all the required inputs can be zero or more optional inputs, each of which is represented by the following notation:

 
[:inputname default.value.expression]

When the procedure is invoked, if actual inputs are not supplied for these optional inputs, the default value expressions are evaluated to set values for the corresponding input names. The inputs are processed from left to right, so a default value expression can be based on earlier inputs. Example:

 
to proc :inlist [:startvalue first :inlist]

If the procedure is invoked by saying

 
proc [a b c]

then the variable inlist will have the value [A B C] and the variable startvalue will have the value A. If the procedure is invoked by saying

 
(proc [a b c] "x)

then inlist will have the value [A B C] and startvalue will have the value X.

After all the required and optional input can come a single rest input, represented by the following notation:

 
[:inputname]

This is a rest input rather than an optional input because there is no default value expression. There can be at most one rest input. When the procedure is invoked, the value of this input will be a list containing all of the actual inputs provided that were not used for required or optional inputs. Example:

 
to proc :in1 [:in2 "foo] [:in3 "baz] [:in4]

If this procedure is invoked by saying

 
proc "x

then in1 has the value X, in2 has the value FOO, in3 has the value BAZ,and in4 has the value [] (the empty list). If it's invoked by saying

 
(proc "a "b "c "d "e)

then in1 has the value A, in2 has the value B, in3 has the value C, and in4 has the value [D E].

The MAXIMUM number of inputs for a procedure is infinite if a rest input is given; otherwise, it is the number of required inputs plus the number of optional inputs.

The DEFAULT number of inputs for a procedure, which is the number of inputs that it will accept if its invocation is not enclosed in parentheses, is ordinarily equal to the minimum number. If you want a different default number you can indicate that by putting the desired default number as the last thing on the TO line. example:

 
to proc :in1 [:in2 "foo] [:in3] 3

This procedure has a minimum of one input, a default of three inputs, and an infinite maximum.

Logo responds to the TO command by entering procedure definition mode. The prompt character changes from ? to > and whatever instructions you type become part of the definition until you type a line containing only the word END.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

define

 
DEFINE procname text

command. Defines a procedure with name procname and text text. If there is already a procedure with the same name, the new definition replaces the old one. The text input must be a list whose members are lists. The first member is a list of inputs; it looks like a TO line but without the word TO, without the procedure name, and without the colons before input names. In other words, the members of this first sublist are words for the names of required inputs and lists for the names of optional or rest inputs. The remaining sublists of the text input make up the body of the procedure, with one sublist for each instruction line of the body. (There is no END line in the text input.) It is an error to redefine a primitive procedure unless the variable REDEFP has the value TRUE.

See section redefp .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

text

 
TEXT procname

outputs the text of the procedure named procname in the form expected by DEFINE: a list of lists, the first of which describes the inputs to the procedure and the rest of which are the lines of its body. The text does not reflect formatting information used when the procedure was defined, such as continuation lines and extra spaces.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

fulltext

 
FULLTEXT procname

outputs a representation of the procedure procname in which formatting information is preserved. If the procedure was defined with TO, EDIT, or LOAD, then the output is a list of words. Each word represents one entire line of the definition in the form output by READWORD, including extra spaces and continuation lines. The last member of the output represents the END line. If the procedure was defined with DEFINE, then the output is a list of lists. If these lists are printed, one per line, the result will look like a definition using TO. Note: the output from FULLTEXT is not suitable for use as input to DEFINE!

See section to , edit , load , define .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

copydef

 
COPYDEF newname oldname

command. Makes newname a procedure identical to oldname. The latter may be a primitive. If newname was already defined, its previous definition is lost. If newname was already a primitive, the redefinition is not permitted unless the variable REDEFP has the value TRUE. Definitions created by COPYDEF are not saved by SAVE; primitives are never saved, and user-defined procedures created by COPYDEF are buried. (You are likely to be confused if you PO or POT a procedure defined with COPYDEF because its title line will contain the old name. This is why it's buried.)

Note: dialects of Logo differ as to the order of inputs to COPYDEF. This dialect uses "MAKE order," not "NAME order."

See section redefp , save , po , pot .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 Variable Definition

make  
name  
local  
localmake  
thing  
global  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

make

 
MAKE varname value

command. Assigns the value value to the variable named varname, which must be a word. Variable names are case-insensitive. If a variable with the same name already exists, the value of that variable is changed. If not, a new global variable is created.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

name

 
NAME value varname				(library procedure)

command. Same as MAKE but with the inputs in reverse order.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

local

 
LOCAL varname
LOCAL varnamelist
(LOCAL varname1 varname2 ...)

command. Accepts as inputs one or more words, or a list of words. A variable is created for each of these words, with that word as its name. The variables are local to the currently running procedure. Logo variables follow dynamic scope rules; a variable that is local to a procedure is available to any subprocedure invoked by that procedure. The variables created by LOCAL have no initial value; they must be assigned a value (e.g., with MAKE) before the procedure attempts to read their value.

See section make .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

localmake

 
LOCALMAKE varname value				(library procedure)

command. Makes the named variable local, like LOCAL, and assigns it the given value, like MAKE.

See section local , See section make .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

thing

 
THING varname
:quoted.varname

outputs the value of the variable whose name is the input. If there is more than one such variable, the innermost local variable of that name is chosen. The colon notation is an abbreviation not for THING but for the combination

 
thing "

so that :FOO means THING "FOO.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

global

 
GLOBAL varname
GLOBAL varnamelist
(GLOBAL varname1 varname2 ...)

command. Accepts as inputs one or more words, or a list of words. A global variable is created for each of these words, with that word as its name. The only reason this is necessary is that you might want to use the "setter" notation SETXYZ for a variable XYZ that does not already have a value; GLOBAL "XYZ makes that legal. Note: If there is currently a local variable of the same name, this command does *not* make Logo use the global value instead of the local one.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.3 Property Lists

Note: Names of property lists are always case-insensitive. Names of individual properties are case-sensitive or case-insensitive depending on the value of CASEIGNOREDP, which is TRUE by default.

See section caseignoredp .

In principle, every possible name is the name of a property list, which is initially empty. So Logo never gives a "no such property list" error, as it would for undefined procedure or variable names. But the primitive procedures that deal with "all" property lists (CONTENTS, PLISTS, etc.) list only nonempty ones. To "erase" a property list erase means to make it empty, removing all properties from it.

pprop  
gprop  
remprop  
plist  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pprop

 
PPROP plistname propname value

command. Adds a property to the plistname property list with name propname and value value.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

gprop

 
GPROP plistname propname

outputs the value of the propname property in the plistname property list, or the empty list if there is no such property.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

remprop

 
REMPROP plistname propname

command. Removes the property named propname from the property list named plistname.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

plist

 
PLIST plistname

outputs a list whose odd-numbered members are the names, and whose even-numbered members are the values, of the properties in the property list named plistname. The output is a copy of the actual property list; changing properties later will not magically change a list output earlier by PLIST.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.4 Workspace Predicates

procedurep  
primitivep  
definedp  
namep  
plistp  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

procedurep

 
PROCEDUREP name
PROCEDURE? name

outputs TRUE if the input is the name of a procedure.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

primitivep

 
PRIMITIVEP name
PRIMITIVE? name

outputs TRUE if the input is the name of a primitive procedure (one built into Logo). Note that some of the procedures described in this document are library procedures, not primitives.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

definedp

 
DEFINEDP name
DEFINED? name

outputs TRUE if the input is the name of a user-defined procedure, including a library procedure. (However, Logo does not know about a library procedure until that procedure has been invoked.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

namep

 
NAMEP name
NAME? name

outputs TRUE if the input is the name of a variable.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

plistp

 
PLISTP name
PLIST? name

outputs TRUE if the input is the name of a *nonempty* property list. (In principle every word is the name of a property list; if you haven't put any properties in it, PLIST of that name outputs an empty list, rather than giving an error message.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.5 Workspace Queries

contents  
buried  
traced  
stepped  
procedures  
names  
plists  
namelist  
pllist  
arity  
nodes  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

contents

 
CONTENTS

outputs a "contents list," i.e., a list of three lists containing names of defined procedures, variables, and property lists respectively. This list includes all unburied named items in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

buried

 
BURIED

outputs a contents list including all buried named items in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

traced

 
TRACED

outputs a contents list including all traced named items in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

stepped

 
STEPPED

outputs a contents list including all stepped named items in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

procedures

 
PROCEDURES

outputs a list of the names of all unburied user-defined procedures in the workspace. Note that this is a list of names, not a contents list. (However, procedures that require a contents list as input will accept this list.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

names

 
NAMES

outputs a contents list consisting of an empty list (indicating no procedure names) followed by a list of all unburied variable names in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

plists

 
PLISTS

outputs a contents list consisting of two empty lists (indicating no procedures or variables) followed by a list of all unburied nonempty property lists in the workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

namelist

 
NAMELIST varname				(library procedure)
NAMELIST varnamelist

outputs a contents list consisting of an empty list followed by a list of the name or names given as input. This is useful in conjunction with workspace control procedures that require a contents list as input.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pllist

 
PLLIST plname					(library procedure)
PLLIST plnamelist

outputs a contents list consisting of two empty lists followed by a list of the name or names given as input. This is useful in conjunction with workspace control procedures that require a contents list as input.

Note: All procedures whose input is indicated as contentslist will accept a single word (taken as a procedure name), a list of words (taken as names of procedures), or a list of three lists as described under the CONTENTS command above.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

arity

 
ARITY procedurename

outputs a list of three numbers: the minimum, default, and maximum number of inputs for the procedure whose name is the input. It is an error if there is no such procedure. A maximum of -1 means that the number of inputs is unlimited.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

nodes

 
NODES

outputs a list of two numbers. The first represents the number of nodes of memory currently in use. The second shows the maximum number of nodes that have been in use at any time since the last invocation of NODES. (A node is a small block of computer memory as used by Logo. Each number uses one node. Each non-numeric word uses one node, plus some non-node memory for the characters in the word. Each array takes one node, plus some non-node memory, as well as the memory required by its elements. Each list requires one node per element, as well as the memory within the elements.) If you want to track the memory use of an algorithm, it is best if you invoke GC at the beginning of each iteration, since otherwise the maximum will include storage that is unused but not yet collected.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6 Workspace Inspection

po  
poall  
pops  
pons  
popls  
pon  
popl  
pot  
pots  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

po

 
PO contentslist

command. Prints to the write stream the definitions of all procedures, variables, and property lists named in the input contents list.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

poall

 
POALL						(library procedure)

command. Prints all unburied definitions in the workspace. Abbreviates PO CONTENTS.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pops

 
POPS						(library procedure)

command. Prints the definitions of all unburied procedures in the workspace. Abbreviates PO PROCEDURES.

See section po , procedures .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pons

 
PONS						(library procedure)

command. Prints the definitions of all unburied variables in the workspace. Abbreviates PO NAMES.

See section po , names .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

popls

 
POPLS						(library procedure)

command. Prints the contents of all unburied nonempty property lists in the workspace. Abbreviates PO PLISTS.

See section po , plists .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pon

 
PON varname					(library procedure)
PON varnamelist

command. Prints the definitions of the named variable(s).
Abbreviates PO NAMELIST varname(list).

See section po , namelist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

popl

 
POPL plname					(library procedure)
POPL plnamelist

command. Prints the definitions of the named property list(s).
Abbreviates PO PLLIST plname(list).

See section po , pllist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pot

 
POT contentslist

command. Prints the title lines of the named procedures and the definitions of the named variables and property lists. For property lists, the entire list is shown on one line instead of as a series of PPROP instructions as in PO.

See section pprop , po .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pots

 
POTS						(library procedure)

command. Prints the title lines of all unburied procedures in the workspace. Abbreviates POT PROCEDURES.

See section procedures .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.7 Workspace Control

erase  
erall  
erps  
erns  
erpls  
ern  
erpl  
bury  
buryall  
buryname  
unbury  
unburyall  
unburyname  
buriedp  
trace  
untrace  
tracedp  
step  
unstep  
steppedp  
edit  
editfile  
edall  
edps  
edns  
edpls  
edn  
edpl  
save  
savel  
load  
help  
seteditor  
setlibloc  
sethelploc  
settemploc  
gc  
.setsegmentsize  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erase

 
ERASE contentslist
ER contentslist

command. Erases from the workspace the procedures, variables, and property lists named in the input. Primitive procedures may not be erased unless the variable REDEFP has the value TRUE.

See section redefp .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erall

 
ERALL

command. Erases all unburied procedures, variables, and property lists from the workspace. Abbreviates ERASE CONTENTS.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erps

 
ERPS

command. Erases all unburied procedures from the workspace.
Abbreviates ERASE PROCEDURES.

See section erase , procedures .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erns

 
ERNS

command. Erases all unburied variables from the workspace. Abbreviates ERASE NAMES.

See section erase , names .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erpls

 
ERPLS

command. Erases all unburied property lists from the workspace.
Abbreviates ERASE PLISTS.

See section erase , plists .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

ern

 
ERN varname					(library procedure)
ERN varnamelist

command. Erases from the workspace the variable(s) named in the input. Abbreviates ERASE NAMELIST varname(list).

See section erase , namelist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

erpl

 
ERPL plname					(library procedure)
ERPL plnamelist

command. Erases from the workspace the property list(s) named in the input. Abbreviates ERASE PLLIST plname(list).

See section erase , pllist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

bury

 
BURY contentslist

command. Buries the procedures, variables, and property lists named in the input. A buried item is not included in the lists output by CONTENTS, PROCEDURES, VARIABLES, and PLISTS, but is included in the list output by BURIED. By implication, buried things are not printed by POALL or saved by SAVE.

See section contents , procedures , pons , plists , poall , save .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

buryall

 
BURYALL                                         (library procedure)

command. Abbreviates BURY CONTENTS.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

buryname

 
BURYNAME varname				(library procedure)
BURYNAME varnamelist

command. Abbreviates BURY NAMELIST varname(list).

See section bury , namelist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unbury

 
UNBURY contentslist

command. Unburies the procedures, variables, and property lists named in the input. That is, the named items will be returned to view in CONTENTS, etc.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unburyall

 
UNBURYALL					(library procedure)

command. Abbreviates UNBURY BURIED.

See section buried .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unburyname

 
UNBURYNAME varname				(library procedure)
UNBURYNAME varnamelist

command. Abbreviates UNBURY NAMELIST varname(list).

See section unbury , namelist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

buriedp

 
BURIEDP contentslist
BURIED? contentslist

outputs TRUE if the first procedure, variable, or property list named in the contents list is buried, FALSE if not. Only the first thing in the list is tested; the most common use will be with a word as input, naming a procedure, but a contents list is allowed so that you can BURIEDP [[] [VARIABLE]] or BURIEDP [[] [] [PROPLIST]].


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

trace

 
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.

See section stop , output , make , pprop .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

untrace

 
UNTRACE contentslist

command. Turns off tracing for the named items.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

tracedp

 
TRACEDP contentslist
TRACED? contentslist

outputs TRUE if the first procedure, variable, or property list named in the contents list is traced, FALSE if not. Only the first thing in the list is tested; the most common use will be with a word as input, naming a procedure, but a contents list is allowed so that you can TRACEDP [[] [VARIABLE]] or TRACEDP [[] [] [PROPLIST]].


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

step

 
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.

See section local .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unstep

 
UNSTEP contentslist

command. Turns off stepping for the named items.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

steppedp

 
STEPPEDP contentslist
STEPPED? contentslist

outputs TRUE if the first procedure, variable, or property list named in the contents list is stepped, FALSE if not. Only the first thing in the list is tested; the most common use will be with a word as input, naming a procedure, but a contents list is allowed so that you can STEPPEDP [[] [VARIABLE]] or STEPPEDP [[] [] [PROPLIST]].


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edit

 
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 a variable LOADNOISILY whose value is TRUE, then, after leaving the editor, TO commands in the temporary file print "PROCNAME defined" (where PROCNAME is the name of the procedure being defined); if LOADNOISILY is FALSE or undefined, TO commands in the file are carried out silently.

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.

See section loadnoisily , See section editfile .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

editfile

 
EDITFILE filename

command. Starts the Logo editor, like EDIT, but instead of editing a temporary file it edits the file specified by the input. When you leave the editor, Logo reads the revised file, as for EDIT. EDITFILE also remembers the filename, so that a subsequent EDIT command with no input will re-edit the same file.

EDITFILE is intended as an alternative to LOAD and SAVE. You can maintain a workspace file yourself, controlling the order in which definitions appear, maintaining comments in the file, and so on.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edall

 
EDALL						(library procedure)

command. Abbreviates EDIT CONTENTS.

See section contents .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edps

 
EDPS						(library procedure)

command. Abbreviates EDIT PROCEDURES.

See section edit , procedures .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edns

 
EDNS						(library procedure)

command. Abbreviates EDIT NAMES.

See section edit , names .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edpls

 
EDPLS						(library procedure)

command. Abbreviates EDIT PLISTS.

See section edit , plists .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edn

 
EDN varname					(library procedure)
EDN varnamelist

command. Abbreviates EDIT NAMELIST varname(list).

See section edit , namelist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

edpl

 
EDPL plname					(library procedure)
EDPL plnamelist

command. Abbreviates EDIT PLLIST plname(list).

See section edit , pllist .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

save

 
SAVE filename

command. Saves the definitions of all unburied procedures, variables, and nonempty property lists in the named file. Equivalent to

 
to save :filename
local "oldwriter
make "oldwriter writer
openwrite :filename
setwrite :filename
poall
setwrite :oldwriter
close :filename
end


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

savel

 
SAVEL contentslist filename			(library procedure)

command. Saves the definitions of the procedures, variables, and property lists specified by contentslist to the file named filename.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

load

 
LOAD filename

command. Reads instructions from the named file and executes them. The file can include procedure definitions with TO, and these are accepted even if a procedure by the same name already exists. If the file assigns a list value to a variable named STARTUP, then that list is run as an instructionlist after the file is loaded. If there is a variable LOADNOISILY whose value is TRUE, then TO commands in the file print "PROCNAME defined" (where PROCNAME is the name of the procedure being defined); if LOADNOISILY is FALSE or undefined, TO commands in the file are carried out silently.

See section startup , See section loadnoisily .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

help

 
HELP name
(HELP)

command. Prints information from the reference manual about the primitive procedure named by the input. With no input, lists all the primitives about which help is available. If there is an environment variable LOGOHELP, then its value is taken as the directory in which to look for help files, instead of the default help directory.

If HELP is called with the name of a defined procedure for which there is no help file, it will print the title line of the procedure followed by lines from the procedure body that start with semicolon, stopping when a non-semicolon line is seen.

Exceptionally, the HELP command can be used without its default input and without parentheses provided that nothing follows it on the instruction line.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

seteditor

 
SETEDITOR path

command. Tells Logo to use the specified program as its editor instead of the default editor. The format of a path depends on your operating system.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

setlibloc

 
SETLIBLOC path

command. Tells Logo to use the specified directory as its library instead of the default. (Note that many Logo "primitive" procedures are actually found in the library, so they may become unavailable if your new library does not include them!) The format of a path depends on your operating system.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

sethelploc

 
SETHELPLOC path

command. Tells Logo to look in the specified directory for the information provided by the HELP command, instead of the default directory. The format of a path depends on your operating system.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

settemploc

 
SETTEMPLOC path

command. Tells Logo to write editor temporary files in the specified directory rather than in the default directory. You must have write permission for this directory. The format of a path depends on your operating system.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

gc

 
GC
(GC anything)

command. Runs the garbage collector, reclaiming unused nodes. Logo does this when necessary anyway, but you may want to use this command to control exactly when Logo does it. In particular, the numbers output by the NODES operation will not be very meaningful unless garbage has been collected. Another reason to use GC is that a garbage collection takes a noticeable fraction of a second, and you may want to schedule collections for times before or after some time-critical animation. If invoked with an argument (of any value), GC runs a full garbage collection, including GCTWA (Garbage Collect Truly Worthless Atoms, which means that it removes from Logo's memory words that used to be procedure or variable names but aren't any more); without an argument, GC does a generational garbage collection, which means that only recently created nodes are examined. (The latter is usually good enough.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

.setsegmentsize

 
.SETSEGMENTSIZE num

command. Sets the number of nodes that Logo allocates from the operating system at once to num, which mush be a positive integer. The name is dotted because bad things will happen if you use a number that's too small or too large for your computer. The initial value is 16,000 for most systems, but is smaller for 68000-based Macs. Making it larger will speed up computations (by reducing the number of garbage collections) at the cost of allocating more memory than necessary.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Brian Harvey on October, 2 2002 using texi2html