On Fri, Jan 30, 2015 at 10:24 AM, Ray Dillinger <[email protected]> wrote:
> > > On 01/30/2015 09:52 AM, Michael Montague wrote: > > Lets say I have an existing routine 'write-stuff-and-close' which works > > just fine with file ports and seems like a reasonable thing to do. If > > get-output-string on a closed port is an error, then I can use a string > > output port with the routine, but I can't get at the output. This seems > > like an arbitrary restriction. > > > > And what, exactly, does it mean to "close" a string port? > Is there any reason why you cannot or should not immediately > reopen the string port you just passed 'write-stuff-and-close' > when it returns if you want to read from it? After all, > you'd have to do the same with any file port if you wanted > to read from it after passing it to that routine. > > If there was a way to reopen an output string port and read from it that would work and there would be no issue. But the only want to get the contents of an output string port is via get-output-string.
_______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
