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

11. Special Variables

Logo takes special action if any of the following variable names exists. They follow the normal scoping rules, so a procedure can locally set one of them to limit the scope of its effect. Initially, no variables exist except for ALLOWGETSET, CASEIGNOREDP, and UNBURYONEDIT, which are TRUE and buried.


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

allowgetset

 
ALLOWGETSET                           (variable)

if TRUE, indicates that an attempt to use a procedure that doesn't exist should be taken as an implicit getter or setter procedure (setter if the first three letters of the name are SET) for a variable of the same name (without the SET if appropriate).


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

buttonact

 
BUTTONACT                           (variable)

if nonempty, should be an instruction list that will be evaluated whenever a mouse button is pressed. Note that the user may have released the button before the instructions are evaluated. BUTTON will still output which button was most recently pressed. CLICKPOS will output the position of the mouse cursor at the moment the button was pressed; this may be different from MOUSEPOS if the user moves the mouse after clicking.

Note that it's possible for the user to press a button during the evaluation of the instruction list. If this would confuse your program, prevent it by temporarily setting BUTTONACT to the empty list. One easy way to do that is the following:

 
make "buttonact [button.action]

to button.action [:buttonact []]
... ; whatever you want the button to do
end

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

caseignoredp

 
CASEIGNOREDP                                (variable)

if TRUE, indicates that lower case and upper case letters should be considered equal by EQUALP, BEFOREP, MEMBERP, etc. Logo initially makes this variable TRUE, and buries it.

See section equalp , beforep , memberp .


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

commandline

 
COMMANDLINE                                (variable)

contains any text appearing after a hyphen on the command line used to start Logo.


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

erract

 
ERRACT                                      (variable)

an instructionlist that will be run in the event of an error. Typically has the value [PAUSE] to allow interactive debugging.

See section pause .


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

fullprintp

 
FULLPRINTP                               (variable)

if TRUE, then words that were created using backslash or vertical bar (to include characters that would otherwise not be treated as part of a word) are printed with the backslashes or vertical bars shown, so that the printed result could be re-read by Logo to produce the same value. If FULLPRINTP is TRUE then the empty word (however it was created) prints as ||. (Otherwise it prints as nothing at all.)


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

keyact

 
KEYACT                               (variable)

if nonempty, should be an instruction list that will be evaluated whenever a key is pressed on the keyboard. The instruction list can use READCHAR to find out what key was pressed. Note that only keys that produce characters qualify; pressing SHIFT or CONTROL alone will not cause KEYACT to be evaluated.

Note that it's possible for the user to press a key during the evaluation of the instruction list. If this would confuse your program, prevent it by temporarily setting KEYACT to the empty list. One easy way to do that is the following:

 
make "keyact [key.action]

to key.action [:keyact []]
... ; whatever you want the key to do
end

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

loadnoisily

 
LOADNOISILY                                 (variable)

if TRUE, prints the names of procedures defined when loading from a file (including the temporary file made by EDIT).

See section edit .


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

printdepthlimit

 
PRINTDEPTHLIMIT                             (variable)

if a nonnegative integer, indicates the maximum depth of sublist structure that will be printed by PRINT, etc.

See section print .


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

printwidthlimit

 
PRINTWIDTHLIMIT                             (variable)

if a nonnegative integer, indicates the maximum number of members in any one list that will be printed by PRINT, etc.

See section print .


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

redefp

 
REDEFP                                      (variable)

if TRUE, allows primitives to be erased (ERASE) or redefined (COPYDEF).

See section erase , copydef .


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

startup

 
STARTUP                                     (variable)

if assigned a list value in a file loaded by LOAD, that value is run as an instructionlist after the loading.

See section load .


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

unburyonedit

 
UNBURYONEDIT                            (variable)

if TRUE, causes any procedure defined during EDIT or LOAD to be unburied, so that it will be saved by a later SAVE. Files that want to define and bury procedures must do it in that order.

See section edit , See section load , See section save .


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

usealternatenames

 
USEALTERNATENAMES					(variable)

if TRUE, causes Logo to generate non-English words (from the ‘Messages’ file) instead of TRUE, FALSE, END, etc.

Logo provides the following buried variables that can be used by programs:


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

logoversion

 
LOGOVERSION                                   (variable)

a real number indicating the Logo version number, e.g., 5.5


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

logoplatform

 
LOGOPLATFORM                                   (variable)

one of the following words: wxWidgets, X11, Windows, or Unix-nographics.


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

This document was generated by Brian Harvey on September, 3 2008 using texi2html 1.78.