Search found 3 matches

by conroe64
Fri Jan 13, 2012 12:55 am
Forum: Common Lisp
Topic: let vs setf in regards to macros
Replies: 4
Views: 7015

Re: let vs setf in regards to macros

How about this? (defmacro foo-mac (name) `(format t "mac ~A: ~S~%" ,name *b*)) With this code, you get the value of *b* at evaluation time, while, with your code, you get the value of *b* at macro-expansion time. I actually need it during macro-expansion time. To be more precise, I'm tryi...
by conroe64
Tue Jan 10, 2012 1:08 pm
Forum: Common Lisp
Topic: let vs setf in regards to macros
Replies: 4
Views: 7015

let vs setf in regards to macros

In the following code, the foo-mac macro will read the current value of the var *b* as set by a setf, but not as set by using a let. However, foo-fun will read the current value of *b* regardless if using a setf or a let. What I would like to do is use macros and a nested structure such as the let's...
by conroe64
Sun May 15, 2011 7:08 pm
Forum: Common Lisp
Topic: Convert integer to bit array and vice versa?
Replies: 8
Views: 25701

Convert integer to bit array and vice versa?

Sorry about the newbie question, but I searched the web and lisp books I have and I can't find the answer to this.

Is there a easy way to convert from an integer to a bit array and vice versa?