Next: 4. The libonyx library
Up: 3. The onyx program
Previous: 3.3 Initialization for interactive
  Contents
  Index
3.4 Language differences
If onyx is being run interactively:
- The name ``stop'' is redefined in the initial thread's errordict to
recursively evaluate the stdin file in a stopped context in order to keep the
interpreter from exiting on error. It is possible (though generally unlikely,
since the user must type a very long line of code) for buffering of stdin to
cause strange things to occur; any additional program execution after an error
is a result of this.
- The name ``resume'' is defined in the initial thread's threaddict as an
alias to the stop operator. Thus, when an error occurs, when the user is ready
to continue running after addressing any issues the error caused, resume can be
called as a more intuitive name for resuming.
- The name ``promptstring'' is defined in systemdict; it takes no arguments
and returns a string. The return string is used as the interactive prompt. For
the duration of the call to promptstring, a temporary definition called
``promptdict'' is stored in the top dictionary on dstack, as a side effect of
the machinery that makes the interpreter somewhat resilient to errors during the
call to promptstring.
If onyx is being run non-interactively:
- The name ``stop'' in errordict is redefined to call the die operator
with an argument of 1.
Next: 4. The libonyx library
Up: 3. The onyx program
Previous: 3.3 Initialization for interactive
  Contents
  Index
Jason Evans
2003-04-05