This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Challenge
From: Chris Cramer <crayc@kiwi.pyro.net>
Subject: Re: Challenge
Date: Thu, 3 Aug 2000 14:21:52 -0500
Message-ID: <20000803142152.A2874@kiwi.pyrotechnics.com>
> On Thu, Aug 03, 2000 at 04:09:47PM +0900, sen_ml@eccosys.com wrote:
> >
> > concerning buffered i/o, is there problem w/ using:
> >
> > (force-output target)
> >
> > for flushing the buffer? [ although it's probably prettier to close
> > the port anyway. ]
>
> hmm... the best way would be to just do something like:
>
> (display output (open-input-file (cadddr command-line)))
>
> or, a less drastic change:
>
> (define output-filename (cadddr command-line))
> ...
> (display output (open-input-file output-filename))
>
> Then it'll just get flushed during garbage collection.
i am confused as to why this should work when not explicitly flushing
or closing the port originally didn't. i get the feeling there's
something going on here that i do not understand.
btw, i was going through guile-procedures.txt and i came across
something named `drain-input'. would that have worked in place of
`dump-port'?
> There's more than one way to do it... =^D
it's not that that got translated from perl too ;-)