
Hi. This is my code: (defun index () (with-html-output-to-string (*standard-output* nil :prologue t) (:html (:head) (:body (:select (dolist (var '("citroen" "volvo" "audi")) (format nil ("(:option %s" var)))))))) I get error: Funny car of form: "(:option %s What's wrong ? Thanks

Am 28.02.12 15:22, schrieb Haris Bogdanovich:
Hi. This is my code: (defun index () (with-html-output-to-string (*standard-output* nil :prologue t) (:html (:head) (:body (:select (dolist (var '("citroen" "volvo" "audi")) (format nil ("(:option %s" var)))))))) I get error: Funny car of form: "(:option %s What's wrong ? Thanks
last line (htm (:option (str var))))))

"Haris Bogdanovich" <fbogdanovic@xnet.hr> writes:
Hi.
This is my code:
(defun index () (with-html-output-to-string (*standard-output* nil :prologue t) (:html (:head) (:body (:select (dolist (var '("citroen" "volvo" "audi")) (format nil ("(:option %s" var))))))))
I get error: Funny car of form: "(:option %s What's wrong ?
(format nil ("(:option %s" var))) doesn't look like valid Common Lisp, I would expect at least (format nil "(:option %s" var)), but it wouldn't do what you want. The correct thing would be (defun index () (cl-who:with-html-output-to-string (*standard-output* nil :prologue t) (:html (:head) (:body (:select (dolist (var '("citroen" "volvo" "audi")) (htm (:option (str var))))))))) -- With best regards, Stas.
participants (3)
-
Haris Bogdanovich
-
Jens Teich
-
Stas Boukarev