Re: backslash-issues
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 08:47:32 -0700
In article <1120120509.941022@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx> wrote:
> So actually, where you can't be sure that you are using the ASCII
> collating sequence if you interpret CHAR according to the Fortran95
> standard, you *can* be sure you are using the ASCII collating sequence
> if you're using F. So that would make this solution portable in F:
While perhaps literally correct as worded, that's not a way that I would
normally use the word "portable". ACHAR is the same as CHAR on many
systems. The whole point of ACHAR is that it is more portable than CHAR
if you specifically want the ASCII collating sequence.
One could just as well say that CHAR is portable in Sun's compiler. (I
assume that ASCII is the default character set in all versions of Sun's
compiler; anyway, it seems likely.)
In general, yes, it is portable to the set of compilers that it works
on. That seems like a safe statement.
Indeed, I'd lay odds that CHAR is the same as ACHAR on the huge majority
of current Fortran implementations, so you can probably get by with it
in practice. But ACHAR is still more portable by design. Because of
that, it is more certain to be portable to future systems as well as
current ones. For a very specific example, what happens if F ever gets
ported to an EBCDIC system? I suspect that the odds of that are low, but
I don't really know. Are you confident that the F spec won't be updated
to say that CHAR does EBCDIC on that system? Maybe the spec just says
ASCII now because that is simpler than talking in abstract about default
character sets and then mentioning elsewhere that it happens to always
be ASCII.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- References:
- backslash-issues
- From: Bart Vandewoestyne
- Re: backslash-issues
- From: Bart Vandewoestyne
- backslash-issues
- Prev by Date: HELP ME - HOW THIS ERROR?
- Next by Date: Re: Recursion
- Previous by thread: Re: backslash-issues
- Next by thread: Re: backslash-issues
- Index(es):
Relevant Pages
|