This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: message primitive


"Greg J. Badros" wrote:
> 
> The error handling code has a printf-like formatting capability such
> that %S and %s format subsequent arguments as write or display style
> output, respectively.  This seems generally useful, but is not available
> at the scheme level, directly-- at least not that I can find [closest is
> `display-error':
> 
> SCM_DEFINE (scm_display_error, "display-error", 6, 0, 0,
>            (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest),
> 
> but that has extra STACK PORT and SUBR arguments.  Would others like a
> `message' primitive that would work like so:
> 
> (message "Foo: %S %s" (list "a" "b"))
> 
> outputs:
> 
> Foo: "a" b
> 
> ?

That sounds really similar to `format'.

 - Maciej

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]