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


mstachow@alum.mit.edu writes:

> "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'.

Except format.scm is 1688 lines of scheme code and does a *whole lot*
more than the simple thing I want: to just expose some C code that
already exists.

Greg

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