home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!gatech!pitt.edu!wbdst
- From: wbdst+@pitt.edu (William B Dwinnell)
- Newsgroups: comp.lang.pascal
- Subject: Re: Help w/ THINK Pascal!
- Message-ID: <2677@blue.cis.pitt.edu>
- Date: 28 Jan 93 01:28:28 GMT
- References: <1993Jan27.223142.9232@news.unomaha.edu>
- Sender: news+@pitt.edu
- Organization: University of Pittsburgh
- Lines: 16
-
-
- Well, I don't know anything about Think Pascal, but a typical file
- handling syntax works like this:
- Your file is namesd 'TEST.DAT', okay?
-
- program LITTLE;
-
- var infile : file;
-
- begin
- Assign(infile,'TEST.DAT'); { Associates the filename with the var }
- Reset(infile); { opens the file for reading }
- for x := 1 to 4 do { Oops, I forgot to declare x! }
- read(infile,data[x]); { Guess I should have declared data[]! }
- Close(infile); { Always put your toys away, when through. }
- end.
-