home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20455 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.3 KB

  1. Path: sparky!uunet!think.com!hsdndev!nmr-z!amber.mgh.harvard.edu!burglin
  2. From: burglin@amber.mgh.harvard.edu (Thomas Burglin)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Reading ASCII files, best way??
  5. Message-ID: <30DEC199217572057@amber.mgh.harvard.edu>
  6. Date: 30 Dec 92 22:57:00 GMT
  7. Sender: usenet@nmr-z.mgh.harvard.edu (User for USENET news postings)
  8. Organization: Molecular Biology, Massachusetts General Hospital, Boston
  9. Lines: 20
  10. News-Software: VAX/VMS VNEWS 1.41
  11. Nntp-Posting-Host: amber.mgh.harvard.edu
  12.  
  13. Hi, I am working on a specialized database program.
  14. It's supposed to read the database as an ASCII text file,
  15. and interpret the ASCII data properly as numbers or text 
  16. strings.
  17. I guess I open the file using the standard toolbox calls,
  18. and subsequently I should read it using FSread(...).
  19.  
  20. Now, what's the best way of doing that.
  21. Should I set the buffer to a big size (i.e. 32k) and
  22. the interpret that whole stuff, or is it as efficient
  23. to read small chunks like line sized (e.g. 80 char) chunks.
  24.  
  25. Second, what's the best way of interpreting the data.
  26. Obviously I could use the sprintf calls to do such conversions,
  27. but would it be more efficient to decode the ascii buffer
  28. all in C "myself".  
  29. How well do standard C library calls and mac Toolbox calls mix?
  30. Thanks for any help.  Replies by email preferred.
  31. Thomas Burglin
  32. burglin@frodo.mgh.harvard.edu
  33.