Next Previous Contents

61. SLang_restart

Synopsis

Reset the interpreter after an error

Usage

void SLang_restart (int full)

Description

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).

Example

      while (1)
        {
           if (SLang_Error) SLang_restart (1);
           (void) SLang_load_file (NULL);
        }
See Also

SLang_init_slang, SLang_load_file


Next Previous Contents