On 7/8/07, Martin DeMello <[EMAIL PROTECTED]> wrote:

No, I want a C function whose body is a string generated by combining
a template and some arguments that fill in slots in the template.


(define-macro (foo name x)
 `(define ,name
     (foreign-lambda* void ((c-string arg))
       ,(format #f "printf(\"~a, %s!\\n\", arg);" x) ) ) )

(foo hello "Hello")
(hello "martin")


?


cheers,
felix


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to