home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8572 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  894 b 

  1. Path: sparky!uunet!ukma!gatech!pitt.edu!wbdst
  2. From: wbdst+@pitt.edu (William B Dwinnell)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Help w/ THINK Pascal!
  5. Message-ID: <2677@blue.cis.pitt.edu>
  6. Date: 28 Jan 93 01:28:28 GMT
  7. References: <1993Jan27.223142.9232@news.unomaha.edu>
  8. Sender: news+@pitt.edu
  9. Organization: University of Pittsburgh
  10. Lines: 16
  11.  
  12.  
  13. Well, I don't know anything about Think Pascal, but a typical file
  14. handling syntax works like this:
  15. Your file is namesd 'TEST.DAT', okay?
  16.  
  17. program LITTLE;
  18.  
  19. var infile : file;
  20.  
  21. begin
  22.      Assign(infile,'TEST.DAT');   { Associates the filename with the var }
  23.      Reset(infile);               { opens the file for reading }
  24.      for x := 1 to 4 do           { Oops, I forgot to declare x! }
  25.          read(infile,data[x]);    { Guess I should have declared data[]! }
  26.      Close(infile);               { Always put your toys away, when through. }
  27. end.
  28.