home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8635 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.uakron.edu!mcs.kent.edu!condor.mcs.kent.edu!delozier
  3. From: delozier@condor.mcs.kent.edu (Greg Delozier)
  4. Subject: Re: Help w/ THINK Pascal!
  5. Message-ID: <1993Jan28.034040.12533@mcs.kent.edu>
  6. Sender: news@mcs.kent.edu
  7. Nntp-Posting-Host: mcs.kent.edu
  8. Organization: Department of Mathematics and Computer Science, Kent State University
  9. References: <1993Jan27.223142.9232@news.unomaha.edu> <2677@blue.cis.pitt.edu>
  10. Date: Thu, 28 Jan 1993 03:40:40 GMT
  11. Lines: 31
  12.  
  13. In article <2677@blue.cis.pitt.edu> wbdst+@pitt.edu (William B Dwinnell) writes:
  14. [...as an example of opening a file...]
  15. >     Assign(infile,'TEST.DAT');   { Associates the filename with the var }
  16. >     Reset(infile);               { opens the file for reading }
  17.  
  18. Well, the assign/reset pair came into popular use (so far as I know) with
  19. Turbo Pascal. Previous to this, on, say, UCSD Pascal, one would use:
  20.     Reset(infile,'TEST.DAT');
  21. or perhaps
  22.     Rewrite(outfile,'TEST.DAT');
  23.  
  24. Why Borland added the 'assign' keyword into a language so obviously patterned
  25. after UCSD,etc, I don't know. (See, for instance, string handling routines...)
  26.  
  27. Anyway, the point is that Apple sort of inherited the UCSD Pascal traditions
  28. when it started writing its own Pascal implementations, and of course, the
  29. THINK Pascal people follow along. Hence, THINK Pascal uses:
  30.     Reset(infile [,title] );
  31. where title is an optional string, and may be omitted on an already open file
  32. to 'rewind' it.
  33.  
  34. For the original poster of the question (the name I don't recall, sorry):
  35.  
  36. Of course, this is in my THINK Pascal User Manual. If you don't have one, you 
  37. will be wasting a lot of time figuring out what THINK Pascal can & can't do. 
  38. It's worth the $$$ to get one by purchasing a licensed copy of the compiler.
  39.  
  40. Best wishes,
  41.  
  42. -greg
  43.  
  44.