ClojureDocs

Nav

Namespaces

printf

clojure.core

Available since 1.0 (source)
  • (printf fmt & args)
Prints formatted output, as per format
2 Examples
(printf "1 + 2 is %s%n" 3)
;; Click the link to clojure.core/format under See also for
;; more extensive examples.  printf and format take the same
;; arguments -- the difference is that format returns a formatted
;; string, whereas printf sends the formatted string to *out*.

;; Also note that printf output is buffered, and does not automatically
;; flush at any time, not even when printing newlines.  Thus the last few lines
;; of output may never appear if your program exits before the buffer is
;; flushed.  Use (flush) or a (println ...) call to force flushing of the buffer.
See Also

Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax

Added by jafingerhut

An implementation of a Common Lisp compatible format function. cl-format formats its arguments to an...

Added by jafingerhut

Same as print followed by (newline)

Added by jafingerhut
0 Notes
No notes for printf