Reset the interpreter after an error
void SLang_restart (int full)
The SLang_restart
function should be called by the
application at top level if an error occurs. If the parameter
full
is non-zero, any objects on the S-lang run time stack
will be removed from the stack; otherwise, the stack will be left
intact. Any time the stack is believed to be trashed, this routine
should be called with a non-zero argument (e.g., if
setjmp
/longjmp
is called).
Calling SLang_restart
does not reset the global variable
SLang_Error
to zero. It is up to the application to reset
that variable to zero after calling SLang_restart
.
while (1)
{
if (SLang_Error)
{
SLang_restart (1);
SLang_Error = 0;
}
(void) SLang_load_file (NULL);
}
SLang_init_slang, SLang_load_file