Search found 25 matches

by makia
Thu Jul 31, 2008 11:52 pm
Forum: Common Lisp
Topic: define-compiler-macro
Replies: 11
Views: 16126

Re: define-compiler-macro

hmm, but how you have such info at compile time ?
by makia
Wed Jul 23, 2008 1:36 am
Forum: Common Lisp
Topic: Parsing large real numbers
Replies: 4
Views: 6057

Re: Parsing large real numbers

well, it's tricky field ... you are using single-floats .... you can use double-floats so you will get: CL-USER> (- (read-from-string "1169991858.90605") 1169991859.32605) 0.0 CL-USER> *read-default-float-format* SINGLE-FLOAT CL-USER> (setf *read-default-float-format* 'double-float) DOUBLE-FLOAT CL-...
by makia
Tue Jul 22, 2008 4:13 am
Forum: Common Lisp
Topic: Confused ....
Replies: 6
Views: 7397

Re: Confused ....

ahh, i expiremented a little .... and got it ...
defparameter establish dynamic variable so "a" in (defun test (a) ...) is dynamic not lexical (that's is what confused me, i thought "a" is lexical inside the function)
by makia
Tue Jul 22, 2008 3:22 am
Forum: Common Lisp
Topic: Confused ....
Replies: 6
Views: 7397

Re: Confused ....

I dont get second example, it should see dynamic binding ... afik :) But you do see dynamic binding, so what is confusing? In the second example a is bound to symbol b, and the symbol-value returns, which is a function, returns the dynamic binding of b. In the first example a is bound to a, and the...
by makia
Tue Jul 22, 2008 2:45 am
Forum: Common Lisp
Topic: Confused ....
Replies: 6
Views: 7397

Confused ....

CL-USER> (defparameter a 0)
CL-USER> (defparameter b 0)
A
CL-USER> (defun test (a)
(print (symbol-value a)))
TEST
CL-USER> (test 'a)

A
A
CL-USER> (test 'b)

0
0

I dont get second example, it should see dynamic binding ... afik :)
Thanks