-frecord-marker
Adrian Umpleby
apumpleby@yahoo.co.uk
Thu Jul 20 11:30:00 GMT 2006
> > > The syntax goes like this (the idea being that RECM has some
> > > conceptual relationship to RECL):
> > > OPEN( ..., RECM='4' )
> >
> > Hmm... for orthogonality with the option name, it might be
> > better to use RECORD_MARKER=''
>
> Don't mean to be a wet blanket, but I have some concerns about this
> approach. It's no good for any of the codes which I work on since it
> destroys compatibility with other Fortran compilers. This will be true
> for pretty much everyone that writes Fortran on a professional basis.
>
> My main concern is that this adds yet another way of specifying
> record markers which will need to be removed when the intel method
> is implemented. I can already hear the cries of all those saying
> that we can't remove it because that would break backwards compatibility.
>
> I don't mind the feature being added, as long as it can be removed just
> as easily.
Hopefully, that won't be necessary - I've already included 'INTEL' (and 'HP') as recognised values
for the tag (i.e. RECM='INTEL'), and it's done in such a way that -frecord-marker is still passed
down through everything (it's only overridden by a RECM tag for that particular unit, so if the
RECM tag does not exist it will use the value from -frecord-marker) - though I haven't actually
implemented Intel or HP record markers (yet).
This means that just extending -frecord-marker to recognise extra values (i.e.
-frecord-marker=intel, or some such) will automatically work as soon as the appropriate
implementation is in place.
For example, internally the Intel record marker format has a value of 101, so using
-frecord-marker=101 (if it was not caught by the options checking code, which I think only allows
values of 4 and 8) would already end up being equivalent to putting RECM='INTEL' on all OPEN
statements. -It's easy enough to get the options checking code to recognise -frecord-marker=intel,
and assign a value of 101 in that case.
I just think that the possibility of specifying per-unit record marker formats is very useful.
(Clearly so, since I can't actually do what I want with just -frecord-marker as it stands at the
moment.)
I guess what would also be useful would be to make -frecord-marker into something which affects
non-main objects, so it can be applied on a case-by-case basis that way, and can be used when
called from C - but still, the way I've added this RECM tag extension should be perfectly
compatible with such a feature (in fact, I suspect it makes it much simpler than before to do this
now).
Bye!
Adrian
___________________________________________________________
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" Â The Wall Street Journal
http://uk.docs.yahoo.com/nowyoucan.html
More information about the Fortran
mailing list