/usr/local/lib/swipl/library/writef.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl -- Print debug messages and test assertions
      • apply.pl -- Apply predicates on a list
      • lists.pl -- List Manipulation
      • broadcast.pl -- Event service
      • shlib.pl
      • option.pl -- Option list processing
      • thread_pool.pl -- Resource bounded thread management
      • gensym.pl -- Generate unique symbols
      • settings.pl -- Setting management
      • arithmetic.pl -- Extensible arithmetic
      • main.pl -- Provide entry point for scripts
      • readutil.pl -- Read utilities
      • operators.pl
      • pairs.pl
      • prolog_source.pl -- Examine Prolog source-files
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl -- Define Quasi Quotation syntax
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl -- Ordered set manipulation
      • random.pl -- Random numbers
      • base64.pl -- Base64 encoding and decoding
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • yall.pl
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl -- Binary associations
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl
      • atom.pl
      • modules.pl -- Module utility predicates
      • occurs.pl -- Finding and counting sub-terms
      • prolog_xref.pl -- Prolog cross-referencer data collection
      • prolog_colour.pl
      • lazy_lists.pl -- Lazy list handling
      • ugraphs.pl -- Graph manipulation library
      • url.pl -- Analysing and constructing URL
      • www_browser.pl
      • prolog_pack.pl
      • git.pl -- Run GIT commands
      • utf8.pl
      • dialect.pl -- Support multiple Prolog dialects
      • system.pl -- System utilities
      • terms.pl -- Term manipulation
      • date.pl -- Process dates and times
      • persistency.pl -- Provide persistent dynamic predicates
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl
      • edinburgh.pl -- Some traditional Edinburgh predicates
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl -- Well Founded Semantics interface
      • prolog_code.pl -- Utilities for reasoning about code
      • sort.pl
      • dicts.pl -- Dict utilities
      • dif.pl -- The dif/2 constraint
      • varnumbers.pl -- Utilities for numbered terms
      • pio.pl -- Pure I/O
      • base32.pl -- Base32 encoding and decoding
      • charsio.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl -- Co-Logic Programming
      • heaps.pl -- heaps/priority queues
      • rbtrees.pl -- Red black trees
      • statistics.pl -- Get information about resource usage
      • when.pl -- Conditional coroutining
      • backcomp.pl
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • ansi_term.pl
      • thread.pl
      • listing.pl
      • zip.pl
      • quintus.pl
      • writef.pl -- Old-style formatted write
        • writef/1
        • writef/2
        • swritef/2
        • swritef/3
      • optparse.pl -- command line parsing
      • edit.pl -- Editor interface
      • prolog_coverage.pl
      • nb_set.pl
      • prolog_codewalk.pl
      • prolog_metainference.pl -- Infer meta-predicate properties
      • prolog_profile.pl -- Execution profiler
      • rwlocks.pl -- Read/write locks
      • make.pl -- Reload modified source files
      • macros.pl -- Macro expansion
      • threadutil.pl -- Interactive thread utilities
      • check.pl -- Consistency checking
      • intercept.pl
      • prolog_trace.pl -- Print access to predicates
      • ctypes.pl -- Character code classification
      • increval.pl
      • tables.pl
      • prolog_jiti.pl -- Just In Time Indexing (JITI) utilities
      • strings.pl -- String utilities
      • tty.pl
      • streams.pl
      • files.pl
      • prolog_autoload.pl
      • prolog_debug.pl -- User level debugging tools
      • help.pl -- Text based manual
      • fastrw.pl -- Fast reading and writing of terms
      • readln.pl
      • shell.pl -- Elementary shell commands
      • prolog_history.pl
      • prolog_config.pl
      • hashtable.pl
      • explain.pl
      • prolog_wrap.pl -- Wrapping predicates
      • qsave.pl
      • oset.pl
 writef(+Format) is det
 writef(+Format, +Arguments) is det
Formatted write to the current_output. Format is a format specifier. Some escape sequences require arguments that must be provided in the list Arguments. There are two types of escape sequences: special characters start with \ and include arguments start with %. The special character sequences are:
\nOutput a newline character
\lOutput a line separator (same as \n)
\rOutput a carriage-return character (ASCII 13)
\rOutput a TAB character (ASCII 9)
\\Output \
\%Output %
\nnnOutput character <nnn>. <nnn> is a 1-3 decimal number

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.

%tprint/1 the next item (mnemonic: term)
%wwrite/1 the next item
%qwriteq/1 the next item
%ddisplay/1 the next item
%nPut the next item as a character
%rWrite the next item N times where N is the second item (an integer)
%sWrite the next item as a String (so it must be a list of characters)
%fPerform a ttyflush/0 (no items used)
%NcWrite the next item Centered in N columns.
%NlWrite the next item Left justified in N columns.
%NrWrite the next item Right justified in N columns.
deprecated
- New code should use format/1, format/2, etc.