另一個 Common Lisp 與多數語言有關,並很常見的資料型別是字串(string),字串用一系列被雙引號包住的字元串表示,比如: "ora et labora" [3] 。整數與字串一樣,都是對自身求值的。 [3] “ora et labora” 是拉丁文,意思是禱告與工作。 有兩個通常在別的語言所找不到的 Lisp 資料型別是符號(symbol)...
Characters are represented as data objects of type character.There are two subtypes of interest, called standard-char and string-char 字符对象可以用#\后跟字符本身来表示。例如,#\g表示小写g的字符对象 common lisp定义了一个标准字符集(子类型standard char),用于两个目的。在标准字符集中写入的common Lis...
Lisp 提供了所有在其他语言找的到的,以及其他语言所找不到的数据类型。一个我们已经使用过的类型是整数(integer),整数用一系列的数字来表示,比如:256。另一个 Common Lisp 与多数语言有关,并很常见的数据类型是字符串(string),字符串用一系列被双引号包住的字符串表示,比如:"ora et labora"[3]。整数与字符串...
author "Shynur <one.last.kiss@outlook.com>" :depends-on (:another-system-a :another-system-b) :components ((:module "src" ; `module' means a directory :components ((:file "packages") ; `file' means a lisp file (:file "main") (:module "helper-functions" :components ((:file "...
Functions 函数是可以作为过程调用的对象;这些对象可以接受参数和返回值。(所有Lisp过程都可以解释为返回值,因此每个过程都是一个函数。)此类对象包括编译函数(编译代码对象)。有些函数表示为一个列表,它是一个特定的符号,比如lambda。符号也可以用作函数。
12.6 kwargs to constructor functions 12.7 修改结构体定义 12.8 print func for structs 12.9 equality of structs 12.10 inheritance 12 Structure and The Type Syetem 总结一下前面学习过的lisp的基本类型,有number, symbol, cons, string, function, stream等,这些都是最基本的 数据类型.structures结构体是用户定...
第十一章:Common Lisp 对象系统 Common Lisp 对象系统,或称 CLOS,是一组用来实现面向对象编程的操作集。由于它们有着同样的历史,通常将这些操作视为一个群组。λ技术上来说,它们与其他部分的 Common Lisp 没什么大不同:defmethod和defun一样,都是整合在语言中的一个部分。
ANSI Common Lisp 中文版手册指南.pdf,ANSI Common Lisp 中文翻譯版 (Chinese Translation) 正體中文 简体中文 前言 前言 Chapter 1 簡介 (Introduction) Chapter 1 简介 (Introduction) Chapter 2 歡迎來到 Lisp (Welcome to Lisp) Chapter 2 欢迎来到 Lisp (Welcome to Li
Functions: (defun name (parameter*) "Optional documentation string." body-form*) 1. Any symbol can be used as a function name. Usually function names contain only alphabetic characters and hyphens or ->. 2. Different flavors of parameters: optional, multiple, keyword. ...
1.简单语法就是Lisp语言的规定特性 54p: 1.使用'/'除法函数时,如果除数与被除数都是整数,则计算结果表示为分数形式,如果其中之一为浮点数,则计算结果就为浮点数,除此以外,任何整数与浮点数进行算数操作时,结果都是浮点数。 56p: 1.Lisp通过代码模式(code mode)和数据模式(data mode)来区分所处理的语句是代码...