This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -frecord-marker


>> Well, after creating a short test, it's clear it's not a runtime
>> option (which is what the online manual and man page claims).
> 
> Quite a number of people have used this option, and you're the
> first to read the documentation that way.

How bizarre! -Maybe there's a difference between 'used' and 'read the documentation'  ;)
Perhaps it's some way of thinking about compiling main that I've not really considered?

Here's the relevant section of the man page, so you can see for yourself:


       Runtime Options
           -fconvert=conversion -frecord-marker=length

       ...

       Influencing runtime behavior

       These options affect the runtime behavior of gfortran.

       -fconvert=conversion
       ...

       -frecord-marker=length
       ...

I guess the phrase "runtime behaviour *of gfortran*" is not really the same as I was thinking
(which would be something more like 'runtime behaviour of gfortran-compiled executable').
I think it could be clearer, though.

> Please feel free to propose a documentation patch if you feel the
> documentation is incomplete or misleading.  For a larger patch,
> you'll need to get a copyright assignment to the FSF in place.

I'm sure I can leave this to others to fight over (if indeed there is any 'fight' at all...)


> If this feature is so important for you, please submit a patch.

OK, I finally got gcc4 compiled (once I'd got a newer binutils that wasn't causing some internal
error).

I've gone through the code and I think I've got a patch worked out (I'm not really a C programmer,
so I might not have done a particularly good job of it) - about to start compiling and testing, so
I'll keep you informed...


The syntax goes like this (the idea being that RECM has some conceptual relationship to RECL):

OPEN( ..., RECM='4' )

I left it as a character string, ready for other possibilities such as 'HP', or 'INTEL', which
were mentioned in past correspondence on the topic. 'G77' is also allowed as a synonym for '4',
and 'GFORTRAN' is a synonym for '8' (that's the theory, anyway...) - perhaps there are some other
ideas about this...?


> The note above about the FSF paperwork applies here, as well.

I'll look into this to find out what I need to do (though useful pointers appreciated...)


>> It also makes it impossible to write a program that could test for and read either format.
> 
> Testing for the format is very hard.

If we assume we know the format of the data in the file being read (other than the marker), then
we can do a pretty good job by trying to read the first line or two with an assumption of 4-byte
marker first of all, and if that gives errors or gibberish values when we read it, then try 8-byte
marker.


> As for reading/writing, you can check the "CONVERT" option to OPEN for how it's done.

That proved to be a useful pointer, thanks!

Adrian



		
___________________________________________________________ 
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]