Libraries

topic ai general.doc::Libraries
Describes what Singular libraries are, how to load them, and the required structure and guidelines for writing your own library.
NavigationPrev · Up · Next

Libraries

Full reference (Texinfo source)
@section Libraries
@cindex Libraries

@itemize @bullet
@item
A library is a collection of @sc{Singular}
procedures in a file.
@item
To load a library into a @sc{Singular} session, use the @code{LIB} or
@code{load} command.
Having loaded a library, its procedures can be used like any built-in
@sc{Singular} function, and information on the library is obtained
by entering @code{help libname.lib;}
@item
@xref{SINGULAR libraries}, for all libraries currently distributed
with  @sc{Singular}.
@item
When writing your own library, it is important to comply with the
guidelines described in this section. Otherwise, due to potential
parser errors, it may not be possible to load the library.
@item
Each library consists of a header and a body. The first line
of a library must start with a double slash @code{//}.
@item
The library header consists of a version string, a category string,
an info string, and LIB commands. The strings are mandatory. LIB
commands are meant to load the additional libraries used by the
library under consideration.
@item
The library body collects the procedures (declared static or not).
@item
No line of a library should consist of more than 60 characters.
@end itemize

@menu
* Libraries in the SINGULAR Documentation::
* Version string::
* Category string::
* Info string::
* LIB commands::
* Procedures in a library::
* template_lib::
* Formal Checker::
* Documentation Tool::
* Typesetting of help and info strings::
* Loading a library::
@end menu