| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!DOCTYPE book [ |
| 3 | <!ENTITY % eclent SYSTEM "ecl.ent"> |
| 4 | %eclent; |
| 5 | ]> |
| 6 | <book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en"> |
| 7 | <chapter xml:id="ansi.printer"> |
| 8 | <title>Printer</title> |
| 9 | |
| 10 | <para>In all situations where the rules are well specified, &ECL; prints |
| 11 | objects according to &ANSI;. The specification leaves however a number of |
| 12 | cases as implementation dependent behavior. The output of &ECL; in those |
| 13 | cases is summarized in <xref linkend="table.printer"/>. Except for the types |
| 14 | <type>character</type> and <type>random-state</type>, most of those examples |
| 15 | regard non-standard written forms <literal>#<...></literal> cannot be |
| 16 | read back using <function>read</function>. These printed representations are |
| 17 | just informative and should not be used to reconstruct or compare |
| 18 | objects.</para> |
| 19 | |
| 20 | <table xml:id="table.printer"> |
| 21 | <title>Implementation specific printed representation</title> |
| 22 | <tgroup cols="3"> |
| 23 | <thead> |
| 24 | <row> |
| 25 | <entry>Lisp type</entry> |
| 26 | <entry>Format</entry> |
| 27 | <entry>Remarks</entry> |
| 28 | </row> |
| 29 | </thead> |
| 30 | <tbody> |
| 31 | <row> |
| 32 | <entry><type>package</type></entry> |
| 33 | <entry><literal>#<package <replaceable>name</replaceable>></literal></entry> |
| 34 | <entry></entry> |
| 35 | </row> |
| 36 | <row> |
| 37 | <entry><type>random-state</type></entry> |
| 38 | <entry><literal>#$<replaceable>character array</replaceable></literal></entry> |
| 39 | <entry></entry> |
| 40 | </row> |
| 41 | <row> |
| 42 | <entry><type>bitvector</type></entry> |
| 43 | <entry><literal>#<bit-vector <replaceable>unique-id</replaceable>></literal></entry> |
| 44 | <entry>Only when <varname>*print-array*</varname> is false.</entry> |
| 45 | </row> |
| 46 | <row> |
| 47 | <entry><type>vector</type></entry> |
| 48 | <entry><literal>#<vector <replaceable>unique-id</replaceable>></literal></entry> |
| 49 | <entry>Only when <varname>*print-array*</varname> is false.</entry> |
| 50 | </row> |
| 51 | <row> |
| 52 | <entry><type>array</type></entry> |
| 53 | <entry><literal>#<array <replaceable>unique-id</replaceable>></literal></entry> |
| 54 | <entry>Only when <varname>*print-array*</varname> is false.</entry> |
| 55 | </row> |
| 56 | <row> |
| 57 | <entry><type>hash-table</type></entry> |
| 58 | <entry><literal>#<hash-table <replaceable>unique-id</replaceable>></literal></entry> |
| 59 | <entry></entry> |
| 60 | </row> |
| 61 | <row> |
| 62 | <entry><type>readtable</type></entry> |
| 63 | <entry><literal>#<readtable <replaceable>unique-id</replaceable>></literal></entry> |
| 64 | <entry></entry> |
| 65 | </row> |
| 66 | <row> |
| 67 | <entry>interpreted <type>function</type></entry> |
| 68 | <entry><literal>#<bytecompiled-function <replaceable>name-or-id</replaceable>></literal></entry> |
| 69 | <entry>Name is a <type>symbol</type>.</entry> |
| 70 | </row> |
| 71 | <row> |
| 72 | <entry>machine compiled <type>function</type></entry> |
| 73 | <entry><literal>#<compiled-function <replaceable>name</replaceable>></literal></entry> |
| 74 | <entry>Name is a <type>symbol</type>.</entry> |
| 75 | </row> |
| 76 | <row> |
| 77 | <entry><type>input-stream</type></entry> |
| 78 | <entry><literal>#<input stream "<replaceable>filename</replaceable>"></literal></entry> |
| 79 | <entry>An stream that reads from <replaceable>filename</replaceable>.</entry> |
| 80 | </row> |
| 81 | <row> |
| 82 | <entry><type>output-stream</type></entry> |
| 83 | <entry><literal>#<output stream "<replaceable>filename</replaceable>"></literal></entry> |
| 84 | <entry>An stream that writes to <replaceable>filename</replaceable>.</entry> |
| 85 | </row> |
| 86 | <row> |
| 87 | <entry><type>probe-stream</type></entry> |
| 88 | <entry><literal>#<probe stream "<replaceable>filename</replaceable>"></literal></entry> |
| 89 | <entry></entry> |
| 90 | </row> |
| 91 | <row> |
| 92 | <entry><type>string-input-stream</type></entry> |
| 93 | <entry><literal>#<string-input stream from "<replaceable>string-piece</replaceable>"></literal></entry> |
| 94 | <entry>The string is the text left to be read.</entry> |
| 95 | </row> |
| 96 | <row> |
| 97 | <entry><type>string-output-stream</type></entry> |
| 98 | <entry><literal>#<string-output stream <replaceable>unique-id</replaceable>></literal></entry> |
| 99 | <entry></entry> |
| 100 | </row> |
| 101 | <row> |
| 102 | <entry><type>two-way-stream</type></entry> |
| 103 | <entry><literal>#<two-way stream <replaceable>unique-id</replaceable>></literal></entry> |
| 104 | <entry></entry> |
| 105 | </row> |
| 106 | <row> |
| 107 | <entry><type>echo-stream</type></entry> |
| 108 | <entry><literal>#<echo stream <replaceable>unique-id</replaceable>></literal></entry> |
| 109 | <entry></entry> |
| 110 | </row> |
| 111 | <row> |
| 112 | <entry><type>synonym-stream</type></entry> |
| 113 | <entry><literal>#<synonym stream to <replaceable>symbol</replaceable>></literal></entry> |
| 114 | <entry></entry> |
| 115 | </row> |
| 116 | <row> |
| 117 | <entry><type>broadcast-stream</type></entry> |
| 118 | <entry><literal>#<broadcast stream <replaceable>unique-id</replaceable>></literal></entry> |
| 119 | <entry></entry> |
| 120 | </row> |
| 121 | <row> |
| 122 | <entry><type>concatenated-stream</type></entry> |
| 123 | <entry><literal>#<concatenated stream <replaceable>unique-id</replaceable>></literal></entry> |
| 124 | <entry></entry> |
| 125 | </row> |
| 126 | <row> |
| 127 | <entry><type>closed-stream</type></entry> |
| 128 | <entry><literal>#<closed <replaceable>...</replaceable>></literal></entry> |
| 129 | <entry>The dots denote any of the above stream forms.</entry> |
| 130 | </row> |
| 131 | </tbody> |
| 132 | </tgroup> |
| 133 | </table> |
| 134 | |
| 135 | <xi:include href="ref_c_printer.xml" xpointer="ansi.printer.c-dict" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 136 | |
| 137 | </chapter> |
| 138 | </book> |