Paul Anton Letnes <
paul.ant...@nospam.gmail.kthxbai.com> wrote:
> On 17.08.12 09:43, Tobias Burnus wrote:
> > On 08/17/2012 09:22 AM, Paul Anton Letnes wrote:
> >> If F2003 says it's OK, I'd expect F2008 to say the same? Anyway, this
> >> will make life somewhat complicated if it can't be resolved... Is there
> >> a standard way of determining a character, parameter :: ... which
> >> contains the "newline" character(s)?
> >
> > A 100% equivalent doesn't exist, but achar(10) should work.
> Ah, I see. I thought that achar(10) was a nonstandard way of doing this,
> but it looks like it should be fine?
Achar(10) is perfectly standard. I agree with Tobias about new_line
being of limitted utility. As you can see from the quote above, new_line
is specifically defined to be achar(10) in most cases. I'd say that the
only cases where it has much application are those where you are looking
for the new_line character used by a non-default character kind. That
would be pretty rare. In particular, that comes up a *LOT* less often
than people getting confused by what new_line means and thinking it will
return the character (or character sequence) used by the OS to represent
a newline in a file. As in, I've never actually seen a useful
application for new_line in practice (largely because I've never worked
with a compiler that supports a character set where it does anything
useful), but the confusion happens regularly.
I suspect you might be thinking of the "F" language, which was an
f90/f95 subset. If I recall correctly, F omitted the achar intrinsic as
part of its subsetting. Or maybe I have it backwards and they omitted
char, but I think it was achar.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain