Per Bothner <p...@bothner.com> writes:

> If you change:
>     (format #t "[~a] ~a\n" result-kind-name label)))
> to:
>     (format #t "[~a] ~a~%" result-kind-name label)))
> then the bufffering is avoided.  This is (newline)
> on the standard output port causes a flush, but
> (display "\n") doesn't.

Aha, thanks for the tip. :-)

I'll note that R5 and 7RS don't require it, and R6RS actually seems to
forbid it (saying it's equivalent to '(write-char #\newline)'), but if
some implementations do it then that's OK.

> An explicit flush-output-port might be preferable,
> but i don't know how portable it is.  It isn't in R5RS,
> but it is in both R6RS and R7RS.

I'll leave it be for now.

Taylan

Reply via email to