4.32.2 Format
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Formatted Write
          • Format
            • format/1
            • format/2
            • format/3
    • Packages
Availability:built-in
format(+Output, +Format, :Arguments)
As format/2, but write the output on the given Output. The de-facto standard only allows Output to be a stream. The SWI-Prolog implementation allows all valid arguments for with_output_to/2.145Earlier versions defined sformat/3 . These predicates have been moved to the library library(backcomp). For example:
?- format(atom(A), '~D', [1000000]).
A = '1,000,000'