Top
Back: proc
Forward: qring
FastBack: poly
FastForward: qring
Up: proc
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.16.1 proc declaration

Syntax:
[static] proc proc_name [(<parameter_list>)
[<help_string>]
{
<procedure_body>
}
[example
{
<sequence_of_commands>
}]
Purpose:
Defines a new function, the proc proc_name. Once loaded in a SINGULAR session, the information provided in the help string will be displayed upon entering help proc_name;, while the example section will be executed upon entering example proc_name;. See Parameter list, Help string, and the example in Procedures in a library.
The help string, the parameter list, and the example section are optional. They are, however, mandatory for the procedures listed in the header of a library. The help string is ignored and no example section is allowed if the procedure is defined interactively, i.e., if it is not loaded from a file by the LIB or load command (see LIB and see load ).
In the body of a library, each procedure not meant to be accessible by users should be declared static. See Procedures in a library.

Example:
 

See LIB; Libraries.


Top Back: proc Forward: qring FastBack: poly FastForward: qring Up: proc Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.