Terrapin Resources

Contents lists

Contents list commands manipulate several items at once using structured contents lists. Such a list is a three-element list, which are again lists. The first element is a list of all affected procedures, the second a list of all names, and the third a list of all properties.

Note: All editing commands like EDIT or EDITFILE can only be used as a direct command, and not from within a procedure. Also, the editor is not available in a published Logo application.

CONTENTS

Outputs a complete structured contents list.

Syntax

Description

CONTENTS outputs a structured contents list containing all user-defined and unburied procedure names, names, and property list names. The list is a three-element list: the first element is a list of all procedure names, the second a list of all names, and the third element is a list of all property list names.

Many commands accept a structured contents list as input. This makes it possible to supply a targeted collection of procedure names, names, and property lists. For example, the list [[] [MYNAME] []] would refer to the name MYNAME, and the list [[MYPROC] [] [A B]] would refer to the procedure MYPROC, and the property lists A and B.

Example

(PR “Procedures: ITEM 1 CONTENTS) Procedures: SQUARE NICKNAME (PR “Names: ITEM 2 CONTENTS) Names: (PR “Propertylists: ITEM 3 CONTENTS) Propertylists: JOE JACK

BURIED

Outputs a structured contents list of all buried elements.

Syntax

Description

BURIED outputs a structured contents list of all buried, non-empty elements.

Example

MAKE “N 1 BURYNAME “N BURIED

BURIED?

Also: BURIEDP

Outputs TRUE if the element described by its input is buried.

Syntax

Description

BURIED outputs TRUE if the element described by its input is buried. If the input is a list or a structured contents list, BURIED? outputs the buried state of the first non-empty element of the list.

BURIEDNAMES

Outputs a list of all buried names.

Syntax

Description

BURIEDNAMES outputs a list of all buried names. BURIEDNAMES is an abbreviation for FIRST BUTFIRST BURIED.

Example

MAKE “N 1 BURYNAME “N BURIEDNAMES Result: [N]

BURIEDPROCS

Outputs a list of all buried procedures.

Syntax

Description

BURIEDPROCS outputs a list of all buried procedures. BURIEDPROCS is an abbreviation for FIRST BURIED

BURIEDPROPS

Outputs a list of all buried property lists.

Syntax

Description

BURIEDPROPS outputs a list of all buried property lists. BURIEDPROPS is an abbreviation for LAST BURIED

Example

PPROP “STAN “AGE “YOUNG BURYPROP “STAN BURIEDPROPS Result: [STAN]

BURY

Makes names and procedures invisible.

Syntax

Description

BURY hides the object(s) specified by its input from the general Logo workspace. Buried elements are like primitives. They are not listed anymore with any of the commands that return lists of elements, like PROCEDURES. The PRINTOUT command does not list their content.

See also BURIEDNAMES, BURIEDPROCS, BURIEDPROPS, BURYALL, BURYNAME, BURYPROC, and BURYPROP.

Example

MAKE “B 456 PON “B B is 456 BURY NAMELIST “B PON “B UNBURY NAMELIST “B PON “B B is 456

BURYALL

Makes all names and procedures invisible.

Syntax

Description

BURYALL makes all names and procedures invisible. BURYALL is an abbreviation for BURY ALL.

BURYNAME

Makes one or more names invisible.

Syntax

Description

BURYNAME makes either a single name or a list of names invisible. BURYNAME is an abbreviation for BURY NAMELIST name-or-list.

BURYNAMES

Makes all names invisible.

Syntax

Description

BURYNAMES makes all names invisible. BURYNAMES is an abbreviation for BURY NAMES.

BURYPROC

Makes one or more procedures invisible.

Syntax

Description

BURYPROC makes either a single procedure or a list of procedures invisible. BURYPROC is synonymous to BURY.

BURYPROCS

Makes all procedures invisible.

Syntax

Description

BURYPROCS makes all procedures invisible. BURYPROCS is an abbreviation for BURY PROCEDURES.

BURYPROP

Makes one or more property lists invisible.

Syntax

Description

BURYPROP makes either a single property list or a list of property lists invisible. BURYPROP is synonymous to BURY PLLIST name-or-list.

BURYPROPS

Makes all property lists invisible.

Syntax

Description

BURYPROPS makes all property lists invisible. BURYPROPS is an abbreviation for BURY PLISTS.

EDALL

Edits the entire Logo workspace.

Syntax

Description

EDALL loads all of the unburied Logo procedures, names, and properties into the editor. EDALL is an abbreviation for EDIT CONTENTS.

EDIT

Edits parts or all of the Logo workspace.

Syntax

Description

EDIT CONTENTS opens the editor and loads all the unburied procedures, names, and property lists that exist in the workspace. EDIT NAMES opens the editor and installs all the user-defined names in the workspace (names defined with MAKE). EDIT PROCEDURES opens the editor with the contents of all the user-defined procedures in the workspace. EDIT PLISTS opens the editor with the contents of all the user-defined properties in the workspace.

EDIT can also be used with a three-element contents list as its input (NAMES, PROCEDURES and PLISTS all output a structured contents list). EDIT edits all procedures, names and properties mentioned in that contents list.

(EDIT) brings the editor panel to the front and activates it.

See also the EDITFILE command that lets you edit files.

EDN

Edits one or more Logo names.

Syntax

Description

EDN loads the unburied Logo name or the list of unburied Logo names into the editor. EDN is an abbreviation for EDIT NAMELIST name-or-list.

EDNS

Edits all Logo names.

Syntax

Description

EDNS loads all of the unburied Logo names into the editor. EDNS is an abbreviation for EDIT NAMES.

EDPL

Edits one or more Logo property lists.

Syntax

Description

EDPL loads the unburied property list or the list of unburied property lists into the editor. EDPL is an abbreviation for EDIT PLLIST name-or-list.

If EDPL is called with a single name as input, a property editory opens that lets you edit the properties of that name interactively.

EDPLIST

Edits the properties of a property list, a widget, or a panel.

Syntax

Description

EDPLIST invokes the property editor for a property list, a widget (like a turtle), or a panel. Its input is the name or the object to edit. For widgets and panels, simply right-click the widget or panel. The editor for these panels displays a simplified editor initially; to edit all properties, click the list icon in the panel’s header bar.

Once a property has been changed, a green arrow appears; clicking that arrow resets the property to its initial value.

Example

EDPLIST “PREFS

EDPS

Edits all user-defined, unburied procedures.

Syntax

Description

EDPS loads user-defined, unburied procedures into the editor. EDPS is an abbreviation for EDIT PROCEDURES.

EDPLS

Edits all Logo properties.

Syntax

Description

EDPLS loads all of the unburied Logo properties into the editor. EDPLS is an abbreviation for EDIT PLISTS.

ERALL

Erases the entire Logo workspace.

Syntax

Description

ERALL erases all unburied Logo procedures, names, and properties.

ERASE

Also: ER

Erases Logo elements.

Syntax

Description

ERASE removes the definition of its input from the workspace. The input to ERASE must be an quoted procedure name or list of procedure names, or the name of an object like a turtle. It can also be a structured contents list (see ALL). ERASE erases all definitions of a name, including its aliases defined with the ALIAS command, regardless of whether the original name or an alias name is used as input. ERASE NAMES removes all user-defined names from the workspace. ERASE PROCEDURES removes all procedures from the workspace. ERASE PLISTS removes all property lists from the workspace. ERASE ALL removes all procedures and names from the workspace.

Use ERASE to erase Logo objects as well. Use the ERASE command just as you would use it to erase procedures. The command ERASE 0, for example, erases the turtle 0.

ERN

Erase one or more Logo names.

Syntax

Description

ERN erases the unburied Logo name or the list of unburied Logo names. ERN is an abbreviation for ERASE NAMELIST name-or-list.

ERNS

Erases all Logo names.

Syntax

Description

ERNS erases all of the unburied Logo names. ERNS is an abbreviation for ERASE NAMES.

ERPL

Erases one or more Logo property lists.

Syntax

Description

ERPL erases the unburied Logo property list or the list of unburied Logo property lists. ERPL is an abbreviation for ERASE PLLIST name-or-list.

ERPLS

Erases all Logo properties.

Syntax

Description

ERPLS erases all of the unburied Logo properties. ERPLS is an abbreviation for ERASE PLISTS.

ERPS

Erases all procedures.

Syntax

Description

ERPS erases all unburied Logo procedures. ERPS is an abbreviation for ERASE PROCEDURES.

NAMELIST

Outputs a structured contents list with names.

Syntax

Description

NAMELIST outputs its input as a structured contents list. Its input is converted to a list if it is not a list, and the output contains that list as its second element. The first and third elements are the empty list. NAMELIST can be used to input a structured list of names to procedures that accept a contents list.

Example

NAMELIST “HI Result: [[][HI][]] NAMELIST [HI WORLD] Result: [[][HI WORLD][]]

NAMES

Outputs a structured contents list with all names.

Syntax

Description

NAMES outputs a structured contents list containing all user-defined, unburied names. The list is a three-element list; the first element is an empty list, the second is a list of all names, and the third element is again an empty list.

Example

NAMES Result: [[][N SIZE]]

PLISTS

Also: PROPERTIES

Outputs a structured contents list with all properties.

Syntax

Description

PLISTS outputs a structured contents list containing all user-defined, unburied properties. The list is a three-element list; the first and second elements are empty lists, and the third element is a list of all names that have properties.

Example

PPROP “CAR “MAKE “BMW PROPERTIES Result: [[][][CAR]]

PLLIST

Outputs a structured contents list with properties.

Syntax

Description

PLLIST outputs its input as a structured contents list. Its input is converted to a list if it is not a list, and the output contains that list as its third element. The first and second elements are the empty list. PLLIST can be used to input a structured list of property list names to procedures that accept a contents list.

Example

PLLIST “HI Result: [[][][HI]] PLLIST [HI WORLD] Result: [[][][HI WORLD]]

POALL

Prints the entire Logo workspace.

Syntax

Description

POALL prints the unburied Logo procedures, names, and properties. POALL is an abbreviation for PRINTOUT ALL.

PON

Prints a Logo name.

Syntax

Description

PON prints the name given by its first input if it is unburied.

Example

MAKE “N 1 PON “N N is 1

PONS

Prints all Logo names.

Syntax

Description

PONS prints all of the unburied Logo names. PONS is an abbreviation for PRINTOUT NAMES.

POPL

Prints one or more Logo property lists.

Syntax

Description

POPL prints the unburied Logo property list or the list of unburied Logo property lists. POPL is an abbreviation for PRINTOUT PLLIST name-or-list.

POPLS

Prints all Logo properties.

Syntax

Description

POPLS prints all of the unburied Logo properties. POPLS is an abbreviation for PRINTOUT PLISTS.

POPS

Prints all Logo procedures.

Syntax

Description

POPS prints all stored procedure definitions. POPS is an abbreviation for PRINTOUT PROCEDURES.

POT

Prints the title line of one or more user-defined procedures.

Syntax

Description

POT prints the titles of one or more user-defined procedures. To print out procedure definitions, use PRINTOUT.

POTS

Prints the title line of all user-defined procedures.

Syntax

Description

POTS prints the titles of all user-defined procedures. To print out procedure definitions, use POPS. POTS is an abbreviation for POT PROCEDURES.

PRIMITIVES

Outputs a structured contents list with all primitives.

Syntax

Description

PRIMITIVES outputs a structured contents list containing all built-in procedure names. The list is a three-element list; the first element is a list of all procedure names, and the second and third elements are the empty list.

PRINTOUT

Also: PO

Prints procedures, names, or properties.

Syntax

Description

PRINTOUT prints the names, definitions, and values specified by its input.

PRINTOUT ALL prints out all procedure titles, definitions, variable names and values, and property lists. PRINTOUT ALL can be abbreviated to PO ALL.

PRINTOUT NAMES prints out all user-defined variable names and values. PRINTOUT NAMES can be abbreviated to PO NAMES or PONS.

PRINTOUT PROCEDURES prints out all user-defined procedure titles and definitions. PRINTOUT PROCEDURES can be abbreviated to PO PROCEDURES or POPS.

PRINTOUT PRIMITIVES prints out all built-in procedure titles. PRINTOUT PRIMITIVES can be abbreviated to PO PRIMITIVES or POPRS.

PRINTOUT also accepts a structured content list, and prints all elements in that list.

PROCEDURES

Outputs a list with all user procedures.

Syntax

Description

PROCEDURES outputs a list containing all user-defined, unburied procedure names. Note that this is not a structured contents list, but all commands that accept such a list can also work with the list returned by PROCEDURES. Use PROCLIST to get a structured contents list.

Example

PROCEDURES Result: [SQUARE TRIANGLE]

PROCLIST

Outputs a structured contents list with procedures.

Syntax

Description

PROCLIST outputs its input as a structured contents list. Its input is converted to a list if it is not a list, and the output contains that list as its first element. The second and third elements are the empty list. PROCLIST can be used to input a structured list of procedures to procedures that accept a contents list.

Example

PROCLIST “HI Result: [[HI][][]] PROCLIST [HI WORLD] Result: [[HI WORLD][][]]

UNBURY

Makes names and procedures visible.

Syntax

Description

UNBURY returns the object(s) specified by its input to the general Logo workspace. UNBURY operates on procedures, names, and/or property lists previously buried with the BURY, BURYNAME, BURYPROC or BURYPROP commands. See also BURIEDNAMES, BURIEDPROCS, BURIEDPROPS, UNBURYALL, UNBURYNAME, UNBURYPROC, and UNBURYPROP.

Built-in commands cannot be unburied.

Example

MAKE “B 456 PON “B B is 456 BURY NAMELIST “B PON “B UNBURY NAMELIST “B PON “B B is 456

UNBURYALL

Makes all names and procedures visible.

Syntax

Description

UNBURYALL makes all names and procedures visible. UNBURYALL is an abbreviation for UNBURY BURIED.

UNBURYNAME

Makes one or more names visible.

Syntax

Description

UNBURYNAME makes either a single name or a list of names visible. UNBURYNAME is an abbreviation for UNBURY NAMELIST name-or-list.

UNBURYNAMES

Makes all names visible.

Syntax

Description

UNBURYNAMES makes all names visible. UNBURYNAME is an abbreviation for UNBURY NAMELIST BURIEDNAMES.

UNBURYPROC

Makes one or more procedures visible.

Syntax

Description

UNBURYPROC makes either a single procedure or a list of procedures visible. UNBURYPROC is an abbreviation for UNBURY PROCLIST name.

UNBURYPROCS

Makes all procedures visible.

Syntax

Description

UNBURYPROCS makes all procedures visible. UNBURYPROCS is an abbreviation for UNBURY BURIEDPROCS.

UNBURYPROP

Makes one or more property lists visible.

Syntax

Description

UNBURYPROP makes either a single property list or a list of property lists visible. UNBURYPROP is synonymous to UNBURY PLLIST name-or-list.

UNBURYPROPS

Makes all property lists visible.

Syntax

Description

UNBURYPROPS makes all property lists visible. UNBURYPROPS is an abbreviation for UNBURY NAMELIST BURIEDPROPS.