# 19.1 读取与打印简介

*读取（reading）*&#x4C;isp 对象意味着读取文本形式的 Lisp 表达式并解析生成相应的 Lisp 对象。这就是 Lisp 程序将 Lisp 代码文件读入 Lisp 的方式。我们将对应的文本称为对象的 *读取语法*。例如，文本 '(a . 5)'为点对的读取语法，其中，这个点对的 CAR 是`a`和 CDR 是数字5。

*打印（printing）*&#x4C;isp 对象意味着生成 表示该对象的文本——将对象转换为其*打印表示* （参见[打印表示](https://www.gnu.org/software/emacs/manual/html_node/elisp/Printed-Representation.html)）。打印上述点对会生成文本 '(a . 5)'。

阅读和打印或多或少是互逆的操作：打印一个对象，会生成对象的语法表示，此语法表示可以被读取并生成该对象；而读取文本，会解析文本，并生成对应的对象，而生成的对象的打印表示，通常为上述被读取的文本。例如，打印符号`foo`会产生文本 'foo'，并读取该文本将返回符号`foo`。打印一个由元素 a 和 b 组成的列表，将生成文本 '(a b)'，而读取该文本，则会生成一个包含元素 a 和 b 的列表（但不是同一个列表）。

然而，这两个操作并不完全相反。有以下三种异常情况：

* 打印操作可能会返回无法用于读取的文本。例如，

  以 '#' 开头的打印表示，如缓冲区、窗口、框架、子进程和标记; 如果您尝试阅读此文本，则会出现错误。没有办法读取这些数据类型。
* 有多种文本表示的对象。例如， '1' 和 '01' 表示相同的整数，而 '(a b)' 和 '(a . (b))' 代表同一个列表。读取操作接受任何等价方案，但打印仅仅会使用某一种方案。
* 注释可以出现在对象读取序列中间的某些位置，而不会影响读取结果。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emacs-lisp.ivory.cafe/du-qu-he-da-yin-lisp-dui-xiang/19.1-du-qu-yu-da-yin-jian-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
