• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
    • DSS Queries
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.32.1 Writef
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Formatted Write
          • Writef
            • writef/1
            • writef/2
            • swritef/3
            • swritef/2
    • Packages
Availability::- use_module(library(writef)).(can be autoloaded)
Source[deprecated]writef(+Format, +Arguments)
Formatted write. Format is an atom whose characters will be printed. Format may contain certain special character sequences which specify certain formatting and substitution actions. Arguments provides all the terms required to be output.

Escape sequences to generate a single special character:

\n Output a newline character (see also nl/[0,1])
\l Output a line separator (same as \n)
\r Output a carriage return character (ASCII 13)
\t Output the ASCII character TAB (9)
\\ The character \ is output
\% The character % is output
\nnn where <nnn> is an integer (1-3 digits); the character with code <nnn> is output (NB : <nnn> is read as decimal)

Note that \l, \nnn and \\ are interpreted differently when character escapes are in effect. See section 2.16.1.3.

Escape sequences to include arguments from Arguments. Each time a % escape sequence is found in Format the next argument from Arguments is formatted according to the specification.

%t print/1 the next item (mnemonic: term)
%w write/1 the next item
%q writeq/1 the next item
%d Write the term, ignoring operators. See also write_term/2. Mnemonic: old Edinburgh display/1
%p print/1 the next item (identical to %t)
%n Put the next item as a character (i.e., it is a character code)
%r Write the next item N times where N is the second item (an integer)
%s Write the next item as a String (so it must be a list of characters)
%f Perform a ttyflush/0 (no items used)
%Nc Write the next item Centered in N columns
%Nl Write the next item Left justified in N columns
%Nr Write the next item Right justified in N columns. N is a decimal number with at least one digit. The item must be an atom, integer, float or string.
ClioPatria (version V3.1.1-21-gb8003bb)