home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / pascal / 6529 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.5 KB

  1. 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
  2. From: 11SSTEINBRIN@gallua.gallaudet.edu (Scotty*Tissue)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Help with this programming
  5. Message-ID: <34042@adm.brl.mil>
  6. Date: 12 Nov 92 14:47:58 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 42
  9.  
  10. I am having trouble reading a text file and making a non text file
  11.  from a text file. Am I missing something here? 
  12. - Scotty
  13.  
  14.  
  15.  
  16. program namefile(names,cons);
  17. type
  18.  jailrec = record
  19.      transcode: integer;
  20.       lastname: packed array[1..10] of char;
  21.      firstname: packed array[1..5] of char;
  22.        address: packed array[1..30] of char;
  23.          major: packed array[1..4] of char;
  24.          phone: packed array[1..8] of char;
  25.           hour: real
  26.            end;
  27. var
  28.  rollcall : jailrec;
  29.  cons     : file of jailrec;
  30.  names    : text;
  31. begin
  32.  open (cons,
  33.        'cons.dat',
  34.         history := new);
  35.  rewrite (cons);
  36.  while not eof(names) do
  37.   begin 
  38.    with rollcall do
  39.     begin
  40.       readln(names,transcode,lastname,firstname,address,major,phone,hour)
  41.     end;
  42.    cons^ := rollcall; 
  43.    put (cons);
  44.   end;
  45.  close (cons); 
  46. end.
  47. Scott A. Steinbrink            VAX/VMS/BITNET: 11SSTEIN@GALLUA
  48. 837 N. Van Dorn St                 CompuServe: 76106,2055
  49. Alexandria, VA 22304                 Intercon: tissue@intercon.com
  50. (703) 823-3579                 America Online: derichman@aol.com
  51. (800) 828-1140 VRC Relay       GO CLEVELAND BROWNS & CAVALIERS!!!!!!
  52.