Previous Topic | Table of Contents | Next Topic

Predefined Per-Thread Variables

Always initialized to the default for each new child thread:

Name
Default
Use
< A synonym for the getline variable.
@ A synonym for the stmtnumber variable.
child 0 Identification number of the last child process spawned.
echoinput 0 Copy the input to stdout as it’s read. (Similar to echoallinput but not inherited to a child thread.)
eofgetline 0 Pseudo-variable to indicate if the last reference to getline encountered an end-of-file condition.
getchar Read one character from stdin without echoing. If stdin is tied to the keyboard, outboard keys are returned as two-character strings.
getline Read one line from stdin pseudo-variable. If stdin is tied to the keyboard, keystrokes are echoed as they’re typed.
history 0 Number of statements to remember on the history list; 0 turns off the history mechanism. (If the thread is interactive, history is automatically set to 100.)
ignoreeof 0 If True, don’t exit at EOF on stdin; insist on an exit command.
ignoreerrors 0 Determine whether execution should continue if an error occurs: 0 means the thread exits; 1 (the default for an interactive thread) means exit from loops or procedures and try to read a new command; 2 means ignore all errors.
ignorestatus 1 If True, a non-zero status code from a child process is ignored. Otherwise, it’s an error.
interactive 0 If True, prompt for input.
irqmask 0 Determines whether interrupts are enabled (0), deferred until the mask is cleared again (1) or ignored (2).
scriptname Name of the C shell script file being executed, if any.
status 0 Exit code of the last child process.
stmtnumber 1 Autoincremented statement number used with the history list and in prompting.
threadid Thread id of the currently executing thread.

Each new thread is initialized with default on-interrupt processing (a forced exit), and null search and replace strings.



Previous Topic | Table of Contents | Next Topic

Copyright © 1988-2003 by Hamilton Laboratories. All rights reserved.