This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Body of `begin' is not evaluated in left-to-right order?
Stephen Compall wrote:
On Sun, 2006-01-15 at 19:54 +0200, Kaloian Doganov wrote:
(define (sleep-example)
(begin (display "before\n") (sleep 3) (display "after\n")))
The current output port is buffered.
For convenience, a call to newline (as opposed to just writing
the "\n" character) *will* flush the buffer of the standard output port.
So you can do:
(begin (display "before") (newline)
(sleep 3)
(display "after") (newline))
Kawa will also automatically flush the buffer when you read from the
standard input port.
--
--Per Bothner
per@bothner.com http://per.bothner.com/