Lisp入门教程(刘鑫翻译).doc
文本预览下载声明
Common LISP Hints
Geoffrey J. Gordon
ggordon@
Friday, February 5, 1993
Modified by
Bruno Haible
haible@ma2s2.mathematik.uni-karlsruhe.de
简体中文版翻译:
刘鑫
March.Liu@
Note: This tutorial introduction to Common Lisp was written for the
CMU environment, so some of the details of running lisp toward the end
may differ from site to site.
注意:这份 Common Lisp 入门教程是针对 CMU
环境编写,所以在其它环境运行
LISP时可能会有细节上的区别。
Further Information
附:
The best LISP textbook I know of is
Guy L. Steele Jr. _Common LISP: the Language_. Digital Press. 1984.
据我所知最好的 Lisp 书籍是:
Guy L. Steele Jr. _Common LISP: the Language_. Digital Press. 1984.
The first edition is easier to read; the second describes a more recent
standard. (The differences between the two standards shouldnt affect
casual programmers.)
第一版很容易阅读,第二版介绍了更新的标准。(两个标准的差异很
小,对于粗
心的程序员没有什么区别。)
A book by Dave Touretsky has also been recommended to me, although I
havent read it, so I cant say anything about it.
我还记得 Dave Touretsky
写了一本,不过我从来没读过,所以不能对那本书
发表评论。
Symbols
符号
A symbol is just a string of characters. There are restrictions on what
you can include in a symbol and what the first character can be, but as
long as you stick to letters, digits, and hyphens, youll be safe.
(Except that if you use only digits and possibly an initial hyphen,
LISP will think you typed an integer rather than a symbol.) Some
examples of symbols:
符号仅仅是字符串。你可以在符号中包含字母、数字、连接符等等,唯一的限制就
是要以字母开头。(如果你只输入数字,最多再以一个连接符开头的话,LISP会认
为你输入了一个整数而不是符号。)例如:
a
b
c1
foo
bar
baaz-quux-garply
Some things you can do with symbols follow. (Things after a prompt
are what you type to the LISP interpreter, while other things are what
the LISP interpreter prints back to you. The ;
显示全部