Re: [Chicken-users] Wrapping C's printf

2007-11-01 Thread felix winkelmann
(Hi! I'd like to use this opportunity to point towards http://www.call-with-current-continuation.org/eggs/fmt.html IMHO, much better and cleaner than C/CL-style formatted printing. cheers, felix) ___ Chicken-users mailing list Chicken-users@nongnu.

Re: [Chicken-users] Wrapping C's printf

2007-11-01 Thread felix winkelmann
On 11/1/07, Peter Busser <[EMAIL PROTECTED]> wrote: > Hi! > > > Hmm, perhaps we should add printf and sprintf to format-modular and > > start adding more printf-esque escape sequences? Or perhaps make a > > separate 'printf' egg with them? > > Would it be possible to let the compiler convert the S

Re: [Chicken-users] Wrapping C's printf

2007-11-01 Thread Peter Busser
Hi! > Hmm, perhaps we should add printf and sprintf to format-modular and > start adding more printf-esque escape sequences? Or perhaps make a > separate 'printf' egg with them? Would it be possible to let the compiler convert the Scheme printf form to a C printf function call? Groetjes, Peter.

Re: [Chicken-users] Wrapping C's printf

2007-10-31 Thread Alejandro Forero Cuervo
> A pure Scheme implementation that (IIRC) comes relatively close to > C's printf is part of slib: [...] Or, if only basic support for sequences such as "%d" and "%s" is needed, this should be very easy to implement on top of format-modular: (use format-modular) (define printf-formatter (

Re: [Chicken-users] Wrapping C's printf

2007-10-30 Thread felix winkelmann
On 10/31/07, Ozzi <[EMAIL PROTECTED]> wrote: > I'd like to wrap C's printf so that I can do something like this: > > (c-printf "The %s of %d and %d is %d" "sum" 1 1 2) > > Which would print "The sum of 1 and 1 is 2." > As Z. pointed out, the "$" macro can do this to some extent, but it's a bit ugl

Re: [Chicken-users] Wrapping C's printf

2007-10-30 Thread Zbigniew
what about http://chicken.wiki.br/dollar On 10/30/07, Ozzi <[EMAIL PROTECTED]> wrote: > I'd like to wrap C's printf so that I can do something like this: > > (c-printf "The %s of %d and %d is %d" "sum" 1 1 2) ___ Chicken-users mailing list Chicken-user

[Chicken-users] Wrapping C's printf

2007-10-30 Thread Ozzi
I'd like to wrap C's printf so that I can do something like this: (c-printf "The %s of %d and %d is %d" "sum" 1 1 2) Which would print "The sum of 1 and 1 is 2." I realize that I can't use a simple foreign-lambda, as I need to call C's printf with an arbitrary argument list. Is there a clean