home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!zurich.ai.mit.edu!jaffer
- From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
- Newsgroups: comp.lang.scheme
- Subject: Re: random rant on random files
- Message-ID: <JAFFER.92Aug20105511@camelot.ai.mit.edu>
- Date: 20 Aug 92 15:55:11 GMT
- References: <9208130624.1.11214@cup.portal.com> <1992Aug17.100735.7594@physiol.su.OZ.AU>
- Sender: news@mintaka.lcs.mit.edu
- Organization: M.I.T. Artificial Intelligence Lab.
- Lines: 29
- In-Reply-To: john@physiol.su.OZ.AU's message of 17 Aug 92 10:07:35 GMT
-
- In article <1992Aug17.100735.7594@physiol.su.OZ.AU> john@physiol.su.OZ.AU (John Mackin) writes:
-
- In article <9208130624.1.11214@cup.portal.com>,
- vanMeule@cup.portal.COM writes:
-
- > I feel a little upset at Scheme for lack of direct support in
- > most Schemes for random files.
-
- Without in any way endorsing the original poster's desire to make
- Scheme into the new COBOL :):), I too was surprised and disappointed
- that R4RS Scheme doesn't have a seek function to apply to ports. I
- have an application where I need to read a (large) file line-wise
- backwards, and the only Scheme I can code it in at the moment is
- Scheme->C where I have access to libc.
-
- scm4a10 offers:
-
- (file-position <port>) procedure
-
- Returns the current position of the character in <port> which will
- next be read or written. If <port> is not open to a file the result
- is unspecified.
-
- (file-set-position <port> <integer>) procedure
-
- Sets the current position in <port> which will next be read or
- written. If <port> is not open to a file the action of
- file-set-position is unspecified. The result of file-set-position is
- unspecified.
-