2.20 Printer

In all situations where the rules are well specified, ECL prints objects according to ANSI [see ANSI]. The specification leaves however a number of cases as implementation dependent behavior. The output of ECL in those cases is summarized in Table 2.11. Except for the types character and random-state, most of those examples regard non-standard written forms #<...> cannot be read back using read. These printed representations are just informative and should not be used to reconstruct or compare objects.

Lisp typeFormatRemarks
package#<package name>
random-state#<random-state array>
bitvector#<bit-vector unique-id>Only when *print-array* is false.
vector#<vector unique-id>Only when *print-array* is false.
array#<array unique-id>Only when *print-array* is false.
hash-table#<hash-table unique-id>
readtable#<readtable unique-id>
interpreted function#<bytecompiled-function name-or-id>Name is a symbol.
machine compiled function#<compiled-function name>Name is a symbol.
input-stream#<input stream "filename">An stream that reads from filename.
output-stream#<output stream "filename">An stream that writes to filename.
probe-stream#<probe stream "filename">
string-input-stream#<string-input stream from "string-piece">The string is the text left to be read.
string-output-stream#<string-output stream unique-id>
two-way-stream#<two-way stream unique-id>
echo-stream#<echo stream unique-id>
synonym-stream#<synonym stream to symbol>
broadcast-stream#<broadcast stream unique-id>
concatenated-stream#<concatenated stream unique-id>
closed-stream#<closed ...>The dots denote any of the above stream forms.

Table 2.11: Implementation-specific printed representation

2.20.1 C Reference

2.20.1.1 ANSI Dictionary

Common Lisp and C equivalence

Lisp symbolC function
copy-pprint-dispatchcl_object cl_copy_pprint_dispatch(cl_narg narg, ...)
pprint-dispatchcl_object cl_pprint_dispatch(cl_narg narg, cl_object object, ...)
pprint-fillcl_object cl_pprint_fill(cl_narg narg, cl_object stream, cl_object object, ...)
pprint-linearcl_object cl_pprint_linear(cl_narg narg, cl_object stream, cl_object object, ...)
pprint-tabularcl_object cl_pprint_tabular(cl_narg narg, cl_object stream, cl_object object, ...)
pprint-indentcl_object cl_pprint_indent(cl_narg narg, cl_object relative_to, cl_object n, ...)
pprint-newlinecl_object cl_pprint_newline(cl_narg narg, cl_object kind, ...)
pprint-tabcl_object cl_pprint_tab(cl_narg narg, cl_object kind, cl_object colnum, cl_object colinc, ...)
print-object[Only in Common Lisp]
set-pprint-dispatchcl_object cl_set_pprint_dispatch(cl_narg narg, cl_object ype_spec, cl_object function, ...)
writecl_object cl_write(cl_narg narg, cl_object object, ...)
prin1cl_object cl_prin1(cl_narg narg, cl_object object, ...)
princcl_object cl_princ(cl_narg narg, cl_object object, ...)
printcl_object cl_print(cl_narg narg, cl_object object, ...)
pprintcl_object cl_pprint(cl_narg narg, cl_object object, ...)
write-to-stringcl_object cl_write_to_string(cl_narg narg, cl_object object, ...)
prin1-to-stringcl_object cl_prin1_to_string(cl_object object)
princ-to-stringcl_object cl_princ_to_string(cl_object object)
print-not-readable-object[Only in Common Lisp]
formatcl_object cl_format(cl_narg narg, cl_object stream, cl_object string, ...)