You are quite correct Otto.
On Tuesday, 13 October 1998, at 12:45,
Otto Stolz <[log in to unmask]> wrote:
> Does this assumption hold on every system your program will be ported to?
> Most probably not!
...
> I am not sure how this situation will be handled by Fortran 90 compilers.
> But I reckon you may find ICHAR(c) > 255, for some character c, soon.
...
> Fortran standards (from Fortran 77 on, when the Character data type has
> been introduced) always have avoided any assumptions about character
> representation (including storage mapping):
Fortran 90/95 has introduced KIND=n for characters, but as for INTEGER,
REAL etc. has avoided pinning down a particular KIND to a particular
representation - it's all compiler/machine dependent, hence making
every program that uses KIND non-portable. It would be good if we
could agree that, for characters, KIND=1 or default character KIND was
ASCII, KIND=2 was UCS-2, ... or some other convention. Maybe define
KIND 1-20( or higher?) in terms of character set Standards and leave
KIND >100 for other vendor defined representations in a similar way
that Unix "ports" are reserved by agreement below a certain number,
but are free for any use above that point.
(Then we could try the same exercise for REAL and INTEGER ! ;-)
While I'm on the soapbox, have the Standards committee considered adding
KIND= arguments to all string handling functions (LLE,SCAN, REPEAT, ...)?
Cheers,
Len
[log in to unmask]:+61 3 9669 8109: CSIRO/Bureau of Meteorology
High Performance Computing and Communications Centre
24th floor, 150 Lonsdale St., Melbourne 3000, Victoria, AUSTRALIA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|