[racket] rexp-match and optional output port

From: Steve Byan (stevebyan at verizon.net)
Date: Thu Apr 11 11:06:51 EDT 2013

On Apr 11, 2013, at 10:34 AM, Robby Findler <robby at eecs.northwestern.edu> wrote:

> You need to close the port I believe. 

Thanks, I assumed the close wasn't needed except to release the file descriptor; I didn't realize it is also needed to flush the output buffer. I just read section 12.1 "Ports" which says close is necessary "to release low-level resources associated with the port." I should have also read section 12.1.3 "Port Buffers and Positions" in the reference. Perhaps section 12.1 would be improved by adding a mention of buffer flushing to the description of close?

My previous experience with output ports used "call-with-output-file" which implicitly closes the port, so I have at least some excuse for my ignorance :-)

Best regards,
-Steve

-- 
Steve Byan <stevebyan at me.com>
Littleton, MA 01460



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130411/affa77ec/attachment-0001.html>

Posted on the users mailing list.