## 3.8 Libraries

- A library is a collection of SINGULAR procedures in a file.
- To load a library into a SINGULAR session, use the `LIB` or `load` command. Having loaded a library, its procedures can be used like any built-in SINGULAR function, and information on the library is obtained by entering `help libname.lib;`
- See SINGULAR libraries, for all libraries currently distributed with SINGULAR.
- 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.
- Each library consists of a header and a body. The first line of a library must start with a double slash `//`.
- 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.
- The library body collects the procedures (declared static or not).
- No line of a library should consist of more than 60 characters.

> 3.8.1 Libraries in the SINGULAR Documentation |  |
> 3.8.2 Version string |  |
> 3.8.3 Category string |  |
> 3.8.4 Info string |  |
> 3.8.5 LIB commands |  |
> 3.8.6 Procedures in a library |  |
> 3.8.7 template_lib |  |
> 3.8.8 Formal Checker |  |
> 3.8.9 Documentation Tool |  |
> 3.8.10 Typesetting of help and info strings |  |
> 3.8.11 Loading a library |  |

User manual for Singular version 4-0-3, 2016, generated by texi2html.