Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appeding to a file



Marize,

The FILEOPT specifier is non-standard. Since standard Fortran 77 did not have a way to open a file for appending, some compilers, such as the Sun compilers, accepted this form as an extension. The standard specifier for this purpose in Fortran 90 and later is: POSITION='APPEND' .

By the way, FILE=FILE(NC:) looks odd. The FILE specifier should be set equal to a character expression, but FILE(NC:) is a character array expression: all elements of the FILE array from position NC to the end.

Ron Sverdlove


Marize Pommot-Maia wrote:

Hi,

This old code that I'm trying to port to OSX has the following instruction:
<code>
     OPEN(OLU,FILE=FILE(NC:),STATUS=STAT,ACCESS='SEQUENTIAL',
   &       FILEOPT='EOF',IOSTAT=IOS)
</code>

When compiling it I get the error:
<code>
       &       FILEOPT='EOF',IOSTAT=IOS)
               ^
Invalid form for OPEN statement at (^)
</code>

Does anybody know why is this the case?  It works in all other *NIX.

Many thanks in advance.

====================================================================
The system:
Darwin Kernel Version 7.7.0: Sun Nov  7 16:06:51 PST 2004;
root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC  powerpc

Compiler:
Reading specs from /sw/lib/gcc/powerpc-apple-darwin7.7.0/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --prefix=/sw
--enable-languages=f77 --infodir=/share/info --libexecdir=/lib
--disable-shared
Thread model: posix
gcc version 3.4.1



-- Ronald Sverdlove email@hidden 609 924-9638

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Fortran-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/fortran-dev/email@hidden

This email sent to email@hidden
References: 
 >Appeding to a file (From: Marize Pommot-Maia <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.