BURY

Synopsis
BURY contentslist
Description

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

It is possible to bury a procedure, variable, or property list before it is defined. If you bury something that is not defined, it does not appear in the output of BURIED, but if it is later defined, it will then appear in the output of BURIED and not in the output of CONTENTS. That is, it will appear as buried as soon as it is defined. Similarly, if you ERASE something that is buried then redefine it, it will also reappear as buried as soon as it is redefined.

BURY does not throw an error if asked to bury a primitive.

See the Workspace Queries section for an explanation of the contentslist input.

Example

The following example shows how BURY can be used to hide a procedure from the workspace.

TO FOO
  PRINT [I am Foo]
END

TO BAR
  PRINT [I am Bar]
END

POTS
TO BAR
TO FOO
BURY [[FOO] [] []]
POTS
TO BAR
FOO
I am Foo

The next example shows how BURY can be used to hide a variable before it is defined.

BURY NAMELIST "variable1
SHOW ITEM 2 BURIED
[]
MAKE "variable1 1
MAKE "variable2 2
SHOW ITEM 2 BURIED
[variable1]
SHOW NAMES
[variable2]

SourceForge.net Logo