home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.centerline.com!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!cmcl2!adm!news
- From: 11SSTEINBRIN@gallua.gallaudet.edu (Scotty*Tissue)
- Newsgroups: comp.lang.pascal
- Subject: Help with this programming
- Message-ID: <34042@adm.brl.mil>
- Date: 12 Nov 92 14:47:58 GMT
- Sender: news@adm.brl.mil
- Lines: 42
-
- I am having trouble reading a text file and making a non text file
- from a text file. Am I missing something here?
- - Scotty
-
-
-
- program namefile(names,cons);
- type
- jailrec = record
- transcode: integer;
- lastname: packed array[1..10] of char;
- firstname: packed array[1..5] of char;
- address: packed array[1..30] of char;
- major: packed array[1..4] of char;
- phone: packed array[1..8] of char;
- hour: real
- end;
- var
- rollcall : jailrec;
- cons : file of jailrec;
- names : text;
- begin
- open (cons,
- 'cons.dat',
- history := new);
- rewrite (cons);
- while not eof(names) do
- begin
- with rollcall do
- begin
- readln(names,transcode,lastname,firstname,address,major,phone,hour)
- end;
- cons^ := rollcall;
- put (cons);
- end;
- close (cons);
- end.
- Scott A. Steinbrink VAX/VMS/BITNET: 11SSTEIN@GALLUA
- 837 N. Van Dorn St CompuServe: 76106,2055
- Alexandria, VA 22304 Intercon: tissue@intercon.com
- (703) 823-3579 America Online: derichman@aol.com
- (800) 828-1140 VRC Relay GO CLEVELAND BROWNS & CAVALIERS!!!!!!
-