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 type | Format | Remarks |
---|---|---|
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. |
Common Lisp and C equivalence
Lisp symbol | C function |
---|---|
copy-pprint-dispatch | cl_object cl_copy_pprint_dispatch(cl_narg narg, ...) |
pprint-dispatch | cl_object cl_pprint_dispatch(cl_narg narg, cl_object object, ...) |
pprint-fill | cl_object cl_pprint_fill(cl_narg narg, cl_object stream, cl_object object, ...) |
pprint-linear | cl_object cl_pprint_linear(cl_narg narg, cl_object stream, cl_object object, ...) |
pprint-tabular | cl_object cl_pprint_tabular(cl_narg narg, cl_object stream, cl_object object, ...) |
pprint-indent | cl_object cl_pprint_indent(cl_narg narg, cl_object relative_to, cl_object n, ...) |
pprint-newline | cl_object cl_pprint_newline(cl_narg narg, cl_object kind, ...) |
pprint-tab | cl_object cl_pprint_tab(cl_narg narg, cl_object kind, cl_object colnum, cl_object colinc, ...) |
print-object | [Only in Common Lisp] |
set-pprint-dispatch | cl_object cl_set_pprint_dispatch(cl_narg narg, cl_object ype_spec, cl_object function, ...) |
write | cl_object cl_write(cl_narg narg, cl_object object, ...) |
prin1 | cl_object cl_prin1(cl_narg narg, cl_object object, ...) |
princ | cl_object cl_princ(cl_narg narg, cl_object object, ...) |
cl_object cl_print(cl_narg narg, cl_object object, ...) | |
pprint | cl_object cl_pprint(cl_narg narg, cl_object object, ...) |
write-to-string | cl_object cl_write_to_string(cl_narg narg, cl_object object, ...) |
prin1-to-string | cl_object cl_prin1_to_string(cl_object object) |
princ-to-string | cl_object cl_princ_to_string(cl_object object) |
print-not-readable-object | [Only in Common Lisp] |
format | cl_object cl_format(cl_narg narg, cl_object stream, cl_object string, ...) |