<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> {The S-lang C Library Reference}: SLang_autoload</TITLE>
<LINK HREF="cref-65.html" REL=next>
<LINK HREF="cref-63.html" REL=previous>
<LINK HREF="cref.html#toc64" REL=contents>
</HEAD>
<BODY>
<A HREF="cref-65.html">Next</A>
<A HREF="cref-63.html">Previous</A>
<A HREF="cref.html#toc64">Contents</A>
<HR>
<H2><A NAME="SLang_autoload"></A> <A NAME="s64">64. <B>SLang_autoload</B></A></H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Autoload a function from a file
<DT><B> Usage </B><DD><P><CODE>int SLang_autoload(char *funct, char *filename)</CODE>
<DT><B> Description </B><DD><P>The <CODE>SLang_autoload</CODE> function may be used to associate a
<CODE>slang</CODE> function name <CODE>funct</CODE> with the file <CODE>filename</CODE>
such that if <CODE>funct</CODE> has not already been defined when needed,
it will be loaded from <CODE>filename</CODE>.
<P><CODE>SLang_autoload</CODE> has no effect if <CODE>funct</CODE> has already been
defined.  Otherwise it declares <CODE>funct</CODE> as a user-defined <B>S-lang</B>
function.  It returns <CODE>0</CODE> upon success, or <CODE>-1</CODE> upon error.
<DT><B> See Also </B><DD><P><CODE>SLang_load_file, SLang_is_defined</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="cref-65.html">Next</A>
<A HREF="cref-63.html">Previous</A>
<A HREF="cref.html#toc64">Contents</A>
</BODY>
</HTML>
