# 11. 控制结构

&#x20;一个完整的Lisp程序通常包含了一系列的表达式。而我们可以使用控制结构来控制这些表达式的求值顺序。所谓的控制结构，就是一些用于控制表达式何时求值、是否求值、或求多少次值的一些特殊表达式。

最简单的求值顺序莫过于顺序求值：首先对表达式a求值，然后是表达式b等等。通常顺序求值会写在函数体中，或Lisp代码文件的顶层，这些表达式将会按照书写的顺序执行。我们称之为文本序。举个例子，某个函数的函数体中包含两个表达式a和b，那么该函数的求值会首先对a求值，然后对b求值。而对b求值的结果将会作为函数求值的结果返回。

显式的控制结构使得更复杂的求值顺序称为可能。

Emacs Lisp提供了若干种控制结构，其中包括了顺序、条件、迭代、跳转及其变体。内置的控制结构为特殊表达式，因此他们的子表达式可能会也可能不会被顺序求值。你可以使用宏来定义你自己的控制结构。


---

# 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/kong-zhi-jie-gou/11.-kong-zhi-jie-gou.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.
