Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!dogie.macc.wisc.edu!vms.macc.wisc.edu From: yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) Newsgroups: comp.sys.mac.programmer Subject: Re: How read by line from file? Message-ID: <3129@dogie.macc.wisc.edu> Date: 6 Feb 90 15:38:02 GMT Sender: news@dogie.macc.wisc.edu Organization: University of Wisconsin Academic Computing Center Lines: 15 In article , rf1m+@andrew.cmu.edu (Richard Vernon Ford) writes... -How do you use FSRead in newline mode? It seems as if it should be -simple to read from a file, one line at a time. Could someone please -send me an example, (I'm using Think C 4.0). You ask how you use FSRead in newline mode? Hah! FSRead has no newline mode, bunky. You bite the bullet and buffer your i/o. Allocate a chunk 'o mem, FSRead into that, and move a ptr thru the chunk searching for carriage returns. When your ptr gets near the end of the chunk 'o mem, do another FSRead. I glossed over a few details, but you get the picture. >>> Internet: yahnke@macc.wisc.edu <<< >>> Mille voix chuchottent <> <<<