Lisp的字面意思就是表处理(list processing), 其实也可以称为树 处理, 这和处理XML节点没有什么不同。 经受这一番折磨以后, 现在我们终于相当接近Lisp了, Lisp的括号的神秘本质(就像许多 Lisp狂热分子认为的)逐渐显现出来。现在我们继续研究其他内容。 重新审视C语言的宏 到了这里, 对XML的讨论你大概都听累了, ...
9.3 比較 (Comparison) 謂詞= 比較其參數,當數值上相等時 ── 即兩者的差爲零時,返回真。 > (= 1 1.0) T > (eql 1 1.0) NIL = 比起eql 來得寬鬆,但參數的型別需一致。 用來比較數字的謂詞爲 < (小於)、 <= (小於等於)、 = (等於)、 >= (大於等於)、 > (大於) 以及 /= (不...
vla-xx,vlax-xx就记得去查Visual lisp函数,此处按下不表 obj2 (vlax-ename->vla-object ent) ) (setq interpt (vlax-invoke obj1 'intersectwith obj2 0)) (setq pt1 (vlax-curve-getClosestPointTo obj1 pt10 t) pt2 (vlax-curve-getClosestPointTo obj1 pt11 ...
A fair comparison of programming languages requires somewhat more than finding the common subset of them. We believe that reaching a given level of productivity and proficiency can be aided by today’s Lisp language design. This problem of writing in a familiar form can be observed more ...
(> atom atom ...) Comparison: Greater than (>= atom atom ...) Comparison: Greater than or equal (and term term ...) Returns the logical AND of multiple terms in a list. (or term term ...) Returns the logical OR of multiple terms in a list. (boole bit_val...
is required) ;; appset is a list of applications, (such as (arx) or (ads) ; ;; returns T or nil, depending on whether app is present in the appset ;; indicated. Case is ignored in comparison, so "foo.arx" matches "FOO.ARX" ;; Also, if appset contains members that contain...
If you want to make a proper comparison, you have to either compare properly declared code in Lisp to properly declared code in other languages. If you do that, Lisp will compare favorably. Otherwise, to be fair, you should compare the speed of undeclared code in Lisp (modest) to the sp...
用Lisp的行话来讲, s表达式称为表(list)。对于上面的例子, 如果我们写的时候不加换 行, 用逗号来代替空格, 那么这个表达式看起来就非常像一个元素列表, 其中又嵌套着其 他标记。 (task, (name, "test"), (echo, (message, "Hello World!"))) 1. XML自然也可以用这样的风格来写。当然上面这句并不是...
(defun sorted (word) (sort (copy-seq word) 'char<)) Note that thesortprocedure is destructive, so we have to take a copy of the word we want to sort before sorting it, usingcopy-seq. The comparison we use ischar<, the character equivalent ofstring<. ...
(19) Comparison Operations(20) Logical Operationson Boolean Values (22) Bitwise Operationson Numbers (24) 10.DECISION MAKING(27) The cond Constructin LISP (28) The if Construct(29) The when Construct(30) The case Construct(31) 11.LOOPS (32)The loop Construct(33) The ...