From: chengiz on
I am trying to compile a fortran 2003 code using a fortran 95
compiler. The only '03 feature the code has is this ONE line:

read(f, pos = <foo>) <var>

One line. I'm trying to avoid having to install an 03 compiler (and
other intermediary wrappers etc) just for this. The last time I used
fortran it was on 77, so any help will be muchly appreciated as to how
I can convert this line to its fortran 95 equivalent. Thank you,

chengiz
From: steve on
On Mar 29, 2:41 pm, chengiz <chen...(a)my-deja.com> wrote:
> I am trying to compile a fortran 2003 code using a fortran 95
> compiler. The only '03 feature the code has is this ONE line:
>
> read(f, pos = <foo>) <var>
>
> One line.  I'm trying to avoid having to install an 03 compiler (and
> other intermediary wrappers etc) just for this. The last time I used
> fortran it was on 77, so any help will be muchly appreciated as to how
> I can convert this line to its fortran 95 equivalent. Thank you,
>
> chengiz

If the above line is copied verbatim from the code, then
you have some vendor's extension because the above line is
not Fortran. You'll need to find out what the vendor
is doing here, or post a large segment of code so that
we provide an alternative syntax.

--
steve
From: Richard Maine on
steve <kargls(a)comcast.net> wrote:

> Please see the original post. The one line of posted code
> is clearly not Fortran.

But it is Fortran abstracted... in fact in the same way that the
standard abstracts it. I can deal with that. (I sure had enough of it
when working on the standard.) Sure, it isn't cut&paste, but to the
extent that one substitutes an appropriate numeric expression for <foo>
and an appropriate variable for <var>, it would be fine. There is, of
course, the possibility that the substitutions in the actual code were
not "appropriate". That would be one of the possibilities to check by
getting a more literal version.

But my judgement was that the problem probably lay elsewhere. That
judgement seems justified. As noted in other posts, he turns out to be
using a pretty old version of gfortran, and that appears to be the most
obvious problem. (Whether there might be others, I couldn't say). That
wasn't my first guess, but it was on the list that I mentioned.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: steve on
On Mar 29, 5:30 pm, nos...(a)see.signature (Richard Maine) wrote:
> steve <kar...(a)comcast.net> wrote:
> > Please see the original post.  The one line of posted code
> > is clearly not Fortran.
>
> But it is Fortran abstracted... in fact in the same way that the
> standard abstracts it.

I searched F2003 for an instance of <foo> or <var>. There
are not such forms (unless xpdf can't find all '<' characters
in the pdf file). Whether J3 used this shorthand in their
exchanges, I don't know.

Before you say it's obvious what OP meant, see Intel's
variable format expression syntax. As you often preach,
OP should post the actual code, not what s/he thinks the
code is.

--
steve
From: Richard Maine on
steve <kargls(a)comcast.net> wrote:
>
> Before you say it's obvious what OP meant, see Intel's
> variable format expression syntax. As you often preach,
> OP should post the actual code, not what s/he thinks the
> code is.

Yes, he should. I'll just claim that it was obvious enough to me and
that my interpretation seems to have been correct in this particular
case, which seems to add at least an element of justification. Maybe it
was just my crystall ball, but I've certainly put it to more challenging
tests that this one was. Yes, it would have been concievable for me to
be wrong. Had things gone on much longer, I probably would have asked
for actual code. But I do make case-by-case judgements of what to ask
for when more seems needed.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain