From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8342753e7337f46d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-16 07:58:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail From: Dan Nagle Newsgroups: comp.lang.ada Subject: Re: Fortran data file -> ADA data file? Date: Tue, 16 Jul 2002 10:56:04 -0400 Organization: Purple Sage Computing Solutions, Inc. Message-ID: References: <3D34148B.9F3E1F55@res.raytheon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: UmFuZG9tSVaBJrlPTuE5EiXPX/MlclTkNquQQvuGoBVSG1m6+e00pYaitGxVwo/U X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 16 Jul 2002 14:57:13 GMT X-Newsreader: Forte Agent 1.9/32.560 Xref: archiver1.google.com comp.lang.ada:27150 Date: 2002-07-16T14:57:13+00:00 List-Id: Hello, Question: Are the Fortran files sequential access or direct access? The Fortran standard does not specify the means of file storage, but a common practice has evolved. If the file is a sequential access unformatted file, then one likely has for each record: <4 bytes of record length>user's data<4 bytes of record length> There may or may not be a physical endfile record. If the file is a direct access unformatted file, then one likely has a "pure data" file where the record is located by using the record length specified on the Fortran open statement and the record number (i.e., seek ((record number) - 1) * recl). There may (or may not) be an invisible-to-the-Fortran-programmer record 0 which contains whatever the Fortran rtl writer thought was needed. If so, the formula is seek ((record number) - 1) * recl + (length of record 0) Of course, the above is all modulo endian issues. HTH BTW, Fortran, like Ada, is spelled with the initial only in upper case. -- Cheers! Dan Nagle Purple Sage Computing Solutions, Inc. On Tue, 16 Jul 2002 08:41:47 -0400, default wrote: > >Would ADA be able to process unformatted record files from FORTRAN? I >am trying to port some FORTRAN code to ADA and this seems like the only >hurdle I may have. Any input is greatly appreciated.