Van Snyder writes:
> Thanks to Malcolm...
> > ... my recommendation is to "require that [a parameter in
> > ISO_FORTRAN_ENV] be ACHAR(10)", as allowing this to vary would be to
> > invite unnecessary portability problems.
>
> Exactly the same kind of portability problems as assuming KIND(0d0)==8.
Yes. Exactly. I agree. I'd been thinking of pointing that out
myself. (Which side are you arguing on here?) That one causes quite
a lot of problems in practice. In the kind(0d0) case, I think there
were good reasons for not codifying that into the standard, though it
causes enough trouble to make me wonder at times.
Yes, the standard says not to assume that. But many users do, and
portability problems result.
Much like yes, apparently the C standard doesn't say that you can
depend on \n being achar(10), but many users do, and portability
problems would result if it weren't that most compilers do that. (The
C standard does prevent the Dos/Win implementations from making \n the
2-character crlf sequence, which probably helps lower the number of
different implementation choices in practice.)
Yes, we could make another case just like this. And then, as I
mentioned before, we could disavow responsibility when it caused
the same kinds of portability problems that kind(0d0)==8 causes,
pointing out that if the users had just followed the standard, they
wouldn't have the problem. Sometimes one just has to hammer that
into the users - but I don't see the need for it here.
But I don't see the compelling reason to buy into this problem.
Perhaps if they really are stuck with a C coprocessor that uses
something other than achar(10) for \n. In that case, they will have
problems anyway, and it seems a toss-up to me whether they would have
more problems by having the Fortran character the same as the C one or
the same as pretty much all other Fortran (and C) implementations.
They are probably screwed either way somewhere.
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|