Re: fortran character set



John Harper wrote:
In article <NtNAi.57317$ax1.27600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
James Giles <jamesgiles@xxxxxxxxxxxxxxxx> wrote:
John Harper wrote:
...
The problem is all the non-dollar currency symbols. Many Americans
call the hash mark or octothorp a pound sign, [...]

Used in that way it usually refers to pounds avoirdupois. I've
never encountered anyone (Americans or otherwise) that thought
it was really a currency symbol.

I seem not to have explained myself clearly enough. When Americans use
the phrase "pound sign" they mean pounds avoirdupois, as James said.
But when British, New Zealanders and possibly others use the phrase
"pound sign" they mean pounds in some currency. Either James never
used the phrase in the company of any such person, or he didn't know
that there had been a failure of communication.

I always call the # symbol "sharp" for the very reason that you
mention. (But then I always call £ "pound sterling" or "British
pound".) I was responding tongue-in-cheek to your implication
that Americans (a word I rarely use for just US citizens) were being
deliberately arrogant. Your "Presumably that was done by people
who thought everyone's currency was dollars" surely seems to imply
such.

Actually $ (which I always call "dollar") is in the language because
some early implementations of Fortran allowed it in identifiers. It
has never had any standard meaning in the language. In other national
variants of some of the character sets Fortran has been implented
with it would have displayed diffferently than $ anyway. For the most
part it would be OK to remove it from the language standard since
it would still be usable under the provision:

Additional characters may be representable in the processor, but may
appear only in comments (3.3.1.1, 3.3.2.1), character constants (4.4.4),
input/output records (9.1.1), and character string edit descriptors
(10.2.1).

But the f2003 committee wanted explicitly list *all* the printable
ASCII characters as part of the implementation set. So there are
now lots of characters in the implementation character set that
have no meaning in the language's syntax (except as part of data),
like sharp(#), grave accent(`), circumflex(^), and question mark(?).
There are others.

Why ASCII instead of the base set of ISO 646 (called the International
Reference Version, IRV)? Well, ASCII *is* the base page of ISO
10646, as well as the ISO 8859 sets. The world seems to be converging
on character sets that have US ASCII as the base page. There's no
reason the Fortran standard shouldn't acquiesce to that.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare


.



Relevant Pages

  • Re: Problem with encoding a character
    ... pound symbol is looking like 2 bytes instead of 1. ... your problem very well may be caused by the problem I noted in my previous post: that you are setting the ContentLength property incorrectly by providing character length instead of byte length. ... I thought the pound sign was a unicode character, but when I tried to change ... You can fix that problem by handling the encoding yourself so that you know exactly how many bytes your message will use, and then just writing those bytes directly rather than using the StreamWriter class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: The "Pound Sign" vs. the "Number Sign"
    ... as "pound". ... ICL used their own 6-bit character set. ... possible that the program naming convention and some other conventions ... The basic character set was based around a 6-bit byte, ...
    (alt.usage.english)
  • Re: Problem with encoding a character
    ... length, as without the pound symbol, everything worked. ... So, while it wasn't specifically encoding the string, it is getting the ... incorrectly by providing character length instead of byte length. ...
    (microsoft.public.dotnet.languages.csharp)
  • pound sign a system spoiler
    ... I found that the pound sign "#" ... as first character of a folder name ... will disable relative path resolution ...
    (microsoft.public.scripting.wsh)
  • Re: Typing a pound sign in an ANSI terminal
    ... Actually, the reason that Folks of Amerkinshire call a hash a pound is entirely because of character sets, and the pound sign in "our" character set is a hash in the Amerkinshire one. ... Lofi Gaming - http://lofi-gaming.org.uk ...
    (comp.sys.sinclair)