SET-STACK
Configures the TCL Stacker Recall command.
Command Class
TCL-I command.
Syntax
SET-STACK {char} {(options}
Syntax Elements
char A single printable character to replace the TCL Stacker Recall command (.).
Options
n A numeric value in the range 0 to 500 that specifies the maximum number of commands in the TCL stack. If count is zero, the stacker is switched off, although the current stack contents are preserved (see Comments).
C Enables or inhibits logging of TCL commands from within DataBasic programs and nested contexts (toggle). Initially off.
D Resets the stack to its default state (see Comments).
F Enables or inhibits the check for a trailing ESC character (initially on). If enabled, TCL commands that end in a trailing ESC character are added to the command stack (without the ESC), but not executed; this allows you to save and edit complex commands that have been mistyped, without attempting to run them. Otherwise, the system attempts to execute the command and places it on the stack with its trailing ESC.
N Enables or inhibits logging of commands from within TCL macros/sentences (toggle). Initially off.
P Enables or inhibits logging of TCL commands from within Procs (toggle). Initially off.
S Switches the TCL command stacker on or off (toggle). Initially on.
T Enables or inhibits the automatic conversion of commands to uppercase as they are saved on the stack (toggle). Initially off.
Note that quoted strings are not affected by this option.
W Enables or inhibits logging of Reality SQL commands run from TCL (toggle). Initially on.
Y Toggles whether commands already on the stack are moved or copied to the top of the stack when they are reused (whether by selecting from the stack or re-entering at TCL). Initially commands are moved.
Comments
Used without parameters or options, SET-STACK displays the current TCL command stack configuration.
The specified configuration stays in effect until you log off from the port. When you log on again, the TCL Stacker Recall command is reset to the period (. - X'2E'), the stack is reinitialised and the size set to 20, and all options are disabled. Note that the LOGTO command does not cause the stack to be reinitialised or the stack command to be changed.
If you switch off the stacker, by using either an (0 or (S option, the current contents of the stack are preserved. However, if you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, then all stacked commands in positions greater than the new size are discarded.
Examples
:
SET-STACK *
Replaces the period (.) recall command with an asterisk (*).
:
SET-STACK * (50
Replaces the period (.) recall command with an asterisk (*) and increases the capacity to 50 commands.
:
SET-STACK (40
Sets the capacity of the stack to 40 commands.
:SET-STACK
TCL Stacker = On
Stack Depth = '20'
Saved commands = '3'
Save PROC cmds = Off
Save SQL STACK cmds = On
Save Macro/Sent cmds = Off
Convert Case = Off
Persistence = Off
Global Context Save = Off
Check EOL ESC = On
Delimiter 0x2E '.'
Emulation set to 'REALITY'
Displays the current TCL command stack configuration.
:
SET-STACK (DP
Enables logging of TCL commands from within Procs - the D option resets the stack to its default state (with Proc logging off) and then the P option switches Proc logging on.