Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

Initialized variables

Oregon Coast

Initialized variables
Previous | Next

Topics

Usage
Predefined initialized variables
See also

Usage

Each thread gets its own copies of the following variables. Each is always initialized to the default, not inherited. In addition, each new thread is initialized with default on-interrupt processing (a forced exit), and null search and replace strings.

Predefined initialized variables

Name Default Use
<

A synonym for the getline variable when typed as $<.

@

A synonym for the stmtnumber variable when typed as $@.

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.

See also

@, calc, set, setenv and local
Variable substitution
Substitution modifiers
Predefined environment variables
Predefined shared variables
Predefined inherited variables
Combined list of predefined variables
Tutorial: Variables
Tutorial: Editing

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.