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 to clear
the state snapshot stored in currenterror, then call the stop operator. Thus,
when an error occurs, when the user is ready to continue running after
addressing any issues the error caused, this provides a convenient way to
resume.
- 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
2005-03-16