Top
Back: print
Forward: prune
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.110 printf

Procedure from library standard.lib (see standard_lib).

Syntax:
printf ( string_expression [, any_expressions] )

Return:
none

Purpose:
printf(fmt,...); performs output formatting. The first argument is a format control string. Additional arguments may be required, depending on the content of the control string. A series of output characters is generated as directed by the control string; these characters are displayed (i.e., printed to standard out).
The control string fmt is simply text to be copied, except that the string may contain conversion specifications.
Type help print; for a listing of valid conversion specifications. As an addition to the conversions of print, the %n and %2 conversion specification does not consume an additional argument, but simply generates a newline character.

Note:
If one of the additional arguments is a list, then it should be enclosed once more into a list() command, since passing a list as an argument flattens the list by one level.

Example:
 
See also: fprintf; print; sprintf; string.


Top Back: print Forward: prune FastBack: Functions and system variables FastForward: Control structures Up: Functions 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.