scsh-users
[Top] [All Lists]

Re: Write a list on a file

To: scsh-news@martigny.ai.mit.edu
Subject: Re: Write a list on a file
From: Olin Shivers <shivers@lambda.ai.mit.edu>
Date: 13 May 1997 17:18:28 -0400
Organization: Artificial Intelligence Lab, MIT
Jin is right -- you have to flush the port. There are several ways you can do
this:

    - Close the port, explicitly or by having it gc'd.

    - Flush the port with one of the following:
      + (force-output p)
      + (flush-all-ports)

    - Set the port so there is no buffering after you open it:
        (define tutu (open-output-file "/u/deugmi2/edesigau/bot/user2"))
        (set-port-buffering tutu bufpol/none)
      Now all output to the port will go straight out to the file system,
      with no buffering. Char-at-a-time output will be even slower than its 
      usual molasses-like progress.

    -Olin

<Prev in Thread] Current Thread [Next in Thread>