Path: utzoo!attcan!uunet!samsung!usc!apple!anderson From: anderson@Apple.COM (Clark Anderson) Newsgroups: comp.sys.mac.programmer Subject: Re: Read/Write data Keywords: read data from files Message-ID: <44910@apple.Apple.COM> Date: 18 Sep 90 02:33:47 GMT References: <13768@hydra.gatech.EDU> Organization: Apple Computer Inc., Cupertino, CA Lines: 26 From: gt4586c@prism.gatech.EDU (WILLETT,THOMAS CARTER): >A great I/O question: why is it that i can write data out to a file >using WRITELN much, much faster than i can read it back in using READLN? >Would it be better to be using FSRead and FSWrite when writing data to >a textfile? It all depends on how Symantec implemented the READLN and WRITELN procedures. Reading from a file means maintaining a buffer, handling end-of file conditions, etc. Writing to a file is usually just doing a FSWrite to it. There is a little bit more to be done, but not a whole lot. Doing FSRead/Write yourself is more direct. Also, you can write to any directory you like, whereas READLN and WRITELN limit you to the directory that your application or project is in. --clark -- ----------------------------------------------------------- Clark Anderson InterNet: anderson@apple.com PCB Software Tools AppleLink: C.ANDERSON Apple Computer, Inc BellNet: 408-974-4593 "I speak only for myself, much to my employer's relief..." -----------------------------------------------------------