Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 2f23fa33dbe9052d0cf09567f1224d7c > files > 116

slang-doc-1.4.4-3mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE> {The S-lang C Library Reference}: SLang_restart</TITLE>
 <LINK HREF="cref-63.html" REL=next>
 <LINK HREF="cref-61.html" REL=previous>
 <LINK HREF="cref.html#toc62" REL=contents>
</HEAD>
<BODY>
<A HREF="cref-63.html">Next</A>
<A HREF="cref-61.html">Previous</A>
<A HREF="cref.html#toc62">Contents</A>
<HR>
<H2><A NAME="SLang_restart"></A> <A NAME="s62">62. <B>SLang_restart</B></A></H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Reset the interpreter after an error
<DT><B> Usage </B><DD><P><CODE>void SLang_restart (int full)</CODE>
<DT><B> Description </B><DD><P>The <CODE>SLang_restart</CODE> function should be called by the
application at top level if an error occurs.  If the parameter
<CODE>full</CODE> is non-zero, any objects on the <B>S-lang</B> 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
<CODE>setjmp</CODE>/<CODE>longjmp</CODE> is called).
<P>Calling <CODE>SLang_restart</CODE> does not reset the global variable
<CODE>SLang_Error</CODE> to zero.  It is up to the application to reset
that variable to zero after calling <CODE>SLang_restart</CODE>.
<DT><B> Example </B><DD><P>
<BLOCKQUOTE><CODE>
<PRE>
      while (1)
        {
           if (SLang_Error) 
             {
                SLang_restart (1);
                SLang_Error = 0;
             }
           (void) SLang_load_file (NULL);
        }
</PRE>
</CODE></BLOCKQUOTE>
<DT><B> See Also </B><DD><P><CODE>SLang_init_slang, SLang_load_file</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="cref-63.html">Next</A>
<A HREF="cref-61.html">Previous</A>
<A HREF="cref.html#toc62">Contents</A>
</BODY>
</HTML>