Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!cbosgd!ulysses!ucbvax!NMFECC.ARPA!KARNEY%PPC.MFENET From: KARNEY%PPC.MFENET@NMFECC.ARPA.UUCP Newsgroups: mod.computers.vax Subject: Reading files with long lines in Pascal Message-ID: <870218132731.0ga@nmfecc.arpa> Date: Wed, 18-Feb-87 16:27:31 EST Article-I.D.: nmfecc.870218132731.0ga Posted: Wed Feb 18 16:27:31 1987 Date-Received: Fri, 20-Feb-87 02:02:27 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 28 Approved: info-vax@sri-kl.arpa I'm trying to read a text file in Pascal. The text file may not have a maximum record length defined. Since the default record length is 133, and since I want to read files with longer lines I use something like program foo(input,output); var f:text; begin open(f,'tst.txt',history:=readonly,record_length:=501); end. so allowing me to handle line with up to 501 characters. This works fine most of the time. E.g., $ create tst.txt foobar ^Z $ r foo is OK. But if the same file is created by EDT, I get %PAS-F-RECLENINC, RECORD_LENGTH specified is inconsistent with this file even though DIRECTORY/FULL shows no differences in record structure. What's going on? How do I reliably read text files with long lines? What I need is some way of specifying a record_length only for those files with no maximum record length defined. I suppose I could do: open(f,'tst.txt',history:=readonly,record_length:=501,error:=continue); if status(f)>0 then open(f,'tst.txt',history:=readonly,error:=continue); But is there a more elegant solution? Charles Karney Karney%PPC.MFENET@NMFECC.ARPA