`#2a((1.0))
From: Nicolas Neuss (my.name_at_iwr.uni-heidelberg.de)
Date: 05/25/04
- Next message: Petter Gustad: "aserve webactions under cmucl"
- Previous message: Barry Margolin: "Re: Why is Monday day 0?"
- Next in thread: Adam Warner: "Re: `#2a((1.0))"
- Reply: Adam Warner: "Re: `#2a((1.0))"
- Reply: Kaz Kylheku: "Re: `#2a((1.0))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 May 2004 18:20:10 +0200
Hello,
Using CMUCL:
1. (let ((x 1)) `#(,x)) => #(1)
2. The following does not yield #2a((1)) but
(let ((x 1)) `#2a((,x))) => #2A((((LISP::|,|) . X)))
(CLISP gives an error here)
Questions: Is the code in (1) or (2) legal? Should (2) work?
My actual problem is the following: I have written a reader macro #m for
reading in matrices as follows
(set-dispatch-macro-character
#\# #\m
#'(lambda (stream char n)
(declare (ignore char n))
(let ((list (read stream nil (values) t)))
`(make-real-matrix ',list)))))
#m((1.0)) returns an 1x1-matrix with entry 1.0. Now it would sometimes be
practical to be able to say
(let ((x 1)) `#m((,x)))
Unfortunately, I have not succeeded to modify my code such that this works.
Thank you for any information.
Nicolas
- Next message: Petter Gustad: "aserve webactions under cmucl"
- Previous message: Barry Margolin: "Re: Why is Monday day 0?"
- Next in thread: Adam Warner: "Re: `#2a((1.0))"
- Reply: Adam Warner: "Re: `#2a((1.0))"
- Reply: Kaz Kylheku: "Re: `#2a((1.0))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|