[ Term I/O | Reference Manual | Alphabetic Index ]

# printf(+Format, ?ArgList)

The arguments in the argument list ArgList are interpreted according to the Format string and the result is printed to the output stream

Format
  String or Atom.
ArgList
  List or any Term.

## Description

Format is an atom or a string which can contain embedded format control sequences. ArgList is a list of arguments that will be interpreted, and possibly printed, under control of these format options. Any part of Format that is not a control sequence is written to the output stream.

For details of the formatting options, see printf/3.

### Modes and Determinism

- printf(+, ?) is det

### Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

### Exceptions

(5) type error
  Format is not an atom or a string.
(5) type error
  ArgList contains argument whose type does not correspond to the control sequence.
(7) string contains unexpected characters
  Format is not correct, it contains too many asterisks or a control character is missing or there is a redundant character before the control character.
(8) bad argument list
  ArgList has not enough or too many arguments.

## Examples

       Equivalent to printf(output, Format, ArgList).  (see printf/3 for
       details).

## See Also

printf / 3, display / 1, display / 2, print / 1, print / 2, sprintf / 3, write / 1, write / 2, writeq / 1, writeq / 2