home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!unipalm!uknet!warwick!cstaddc
- From: cstaddc@csv.warwick.ac.uk (Mr M A Stuart)
- Newsgroups: comp.lang.pascal
- Subject: ??????? User input of textfile to read ?????????
- Message-ID: <1en55vINN1u4@cumin.csv.warwick.ac.uk>
- Date: 22 Nov 92 05:17:50 GMT
- Organization: Computing Services, University of Warwick, UK
- Lines: 26
- NNTP-Posting-Host: cumin.csv.warwick.ac.uk
-
-
-
- Hi, I'm just getting to grips with pascal and have a niggling problem.
- I want to read in a filename using say :
-
- writeln(' Enter filename to read ');
- readln(filename);
-
- and take characters in from the specified file using :
-
- reset(filename)
-
- Naturally filename must be of type : text. This clashes with the first step
- where I assigned the name of the file to filename !!!
-
- i.e. the variable filename must be :
-
- packed array (* to hold filename *)
- file of text. (* to access contents of file *)
-
-
- Can anyone suggest a way around this problem or maybe a new approach to
- achieve the same result.
-
-
- Thankyou very much for any help offered.
-