From fbogdanovic at xnet.hr Tue Feb 28 14:22:01 2012 From: fbogdanovic at xnet.hr (Haris Bogdanovich) Date: Tue, 28 Feb 2012 15:22:01 +0100 Subject: [cl-who-devel] dolist Message-ID: <0D1A600133BE4708A00FDD3CD94BB172@komp> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stassats at gmail.com Tue Feb 28 15:00:08 2012 From: stassats at gmail.com (Stas Boukarev) Date: Tue, 28 Feb 2012 19:00:08 +0400 Subject: [cl-who-devel] dolist In-Reply-To: <0D1A600133BE4708A00FDD3CD94BB172@komp> (Haris Bogdanovich's message of "Tue, 28 Feb 2012 15:22:01 +0100") References: <0D1A600133BE4708A00FDD3CD94BB172@komp> Message-ID: <87d38zj953.fsf@gmail.com> "Haris Bogdanovich" 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. From info at jensteich.de Tue Feb 28 14:56:10 2012 From: info at jensteich.de (Jens Teich) Date: Tue, 28 Feb 2012 15:56:10 +0100 Subject: [cl-who-devel] dolist In-Reply-To: <0D1A600133BE4708A00FDD3CD94BB172@komp> References: <0D1A600133BE4708A00FDD3CD94BB172@komp> Message-ID: <4F4CEB0A.3050101@jensteich.de> 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))))))