Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.7 $; site ndm20 Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!convex!ndm20!tp From: tp@ndm20 Newsgroups: net.lang Subject: Re: Bet you can't get this problem! Message-ID: <3600001@ndm20> Date: Fri, 2-Aug-85 16:10:00 EDT Article-I.D.: ndm20.3600001 Posted: Fri Aug 2 16:10:00 1985 Date-Received: Tue, 6-Aug-85 09:12:17 EDT References: <909@rayssd.UUCP> Lines: 31 Nf-ID: #R:rayssd.UUCP:-90900:ndm20:3600001:000:1137 Nf-From: ndm20!tp Aug 2 15:10:00 1985 >Vax-11 C. I want to read in one line at a time, and every line is of a >varying length. I think this pretty much precludes using fortran i/o routines, >as I haven't figured out how to input varying length strings in fortran (I You can do it if you know the maximum length (which you probably do if it is a file with carriage control). Note that this is standard Fortran 77, not VMS specific, though of course the carriage-control problem is. SUBROUTINE READREC(STRING,UNIT) CHARACTER STRING*80 INTEGER UNIT READ(UNIT,'(A)')STRING RETURN END Not knowing anything about vax-11 C, I'm not sure the proper calling sequence for this routine from C, but I'm sure it can be done. Of course, if you have control over the program writing the files the simplest thing to do would probably be to put CARRIAGECONTROL='LIST' in the open statement for the output file, and thus avoid FORTRAN carriage-control altogether. Terry Poot Nathan D. Maier Consulting Engineers (214)739-4741 Usenet: ...!{allegra|ihnp4}!convex!smu!ndm20!tp CSNET: ndm20!tp@smu ARPA: ndm20!tp%smu@csnet-relay.ARPA