Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 700475c8ae73fb4d57b6df4485c29e1c > files > 197

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE> S-Lang Run-Time Library Reference: Version 1.4.0: Module Functions</TITLE>
 <LINK HREF="slangfun-17.html" REL=next>
 <LINK HREF="slangfun-15.html" REL=previous>
 <LINK HREF="slangfun.html#toc16" REL=contents>
</HEAD>
<BODY>
<A HREF="slangfun-17.html">Next</A>
<A HREF="slangfun-15.html">Previous</A>
<A HREF="slangfun.html#toc16">Contents</A>
<HR>
<H2><A NAME="s16">16. Module Functions</A></H2>

<P>
<H2><A NAME="get_import_module_path"></A> <A NAME="ss16.1">16.1 <B>get_import_module_path</B></A>
</H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Get the search path for dynamically loadable objects
<DT><B> Usage </B><DD><P><CODE>String_Type get_import_module_path ()</CODE>
<DT><B> Description </B><DD><P>The <CODE>get_import_module_path</CODE> may be used to get the search path
for dynamically shared objects.  Such objects may be made accessable
to the application via the <CODE>import</CODE> function.
<DT><B> See Also </B><DD><P><CODE>import, set_import_module_path</CODE>
</DL>
<P>
<P>
<H2><A NAME="import"></A> <A NAME="ss16.2">16.2 <B>import</B></A>
</H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Dynamically link to a specified module
<DT><B> Usage </B><DD><P><CODE>import (String_Type module [, String_Type namespace])</CODE>
<DT><B> Description </B><DD><P>The <CODE>import</CODE> function causes the run-time linker to dynamically
link to the shared object specified by the <CODE>module</CODE> parameter.
It seaches for the shared object as follows: First a search is
performed along all module paths specified by the application.  Then
a search is made along the paths defined via the
<CODE>set_import_module_path</CODE> function.  If not found, a search is
performed along the paths given by the <CODE>SLANG_MODULE_PATH</CODE>
environment variable.  Finally, a system dependent search is
performed (e.g., using the <CODE>LD_LIBRARY_PATH</CODE> environment
variable).
<P>The optional second parameter may be used to specify a namespace
for the intrinsic functions and variables of the module.  If this
parameter is not present, the intrinsic objects will be placed into
the global namespace.
<P>This function signals an error if the specified module is not found.
<DT><B> Notes </B><DD><P>The <CODE>import</CODE> function is not available on all systems.
<DT><B> See Also </B><DD><P><CODE>set_import_module_path, use_namespace, current_namespace, getenv, evalfile</CODE>
</DL>
<P>
<P>
<H2><A NAME="set_import_module_path"></A> <A NAME="ss16.3">16.3 <B>set_import_module_path</B></A>
</H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Set the search path for dynamically loadable objects
<DT><B> Usage </B><DD><P><CODE>set_import_module_path (String_Type path_list)</CODE>
<DT><B> Description </B><DD><P>The <CODE>set_import_module_path</CODE> may be used to set the search path
for dynamically shared objects.  Such objects may be made accessable
to the application via the <CODE>import</CODE> function.
<P>The actual syntax for the specification of the set of paths will
vary according to the operating system.  Under Unix, a colon
character is used to separate paths in <CODE>path_list</CODE>.  For win32
systems a semi-colon is used.
<DT><B> See Also </B><DD><P><CODE>import, get_import_module_path</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="slangfun-17.html">Next</A>
<A HREF="slangfun-15.html">Previous</A>
<A HREF="slangfun.html#toc16">Contents</A>
</BODY>
</HTML>