This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch] intrinsic.texi: 13 down
Hello,
Daniel Franke schrieb:
>> Shouldn't one use z'F' rather than 'F'z?
> citing the latest GFortran Manual, section 7.8:
> "BOZ literal constants can also be specified by adding a suffix to the string.
> For example, Z'ABC' and 'ABC'Z are the same constant."
I thought the idea is to use - if possible - the Fortran standard way.
According my Fortran 2003 copy:
R411 boz-literal-constant
is binary-constant or octal-constant or hex-constant
R412 binary-constant
is B ’ digit [ digit ] ... ’
or B " digit [ digit ] ... "
C408 (R412) digit shall have one of the values 0 or 1.
R413 octal-constant
is O ’ digit [ digit ] ... ’
or O " digit [ digit ] ... "
C409 (R413) digit shall have one of the values 0 through 7.
R414 hex-constant
is Z ’ hex-digit [ hex-digit ] ... ’
or Z " hex-digit [ hex-digit ] ... "
R415 hex-digit is digit or A or B or C or D or E or F
Therefore I would like to see z'F' rather than 'F'z, even
though gfortran supports both.
> The other points you raise are valid, but maybe beyond the scope of those
> showcase snippets?!
Well, my idea is that those snippets give new Fortran programmers
some good example. Putting the initialization in the same line
I would not recommend because of the SAVE side effect. I didn't
say you should input all those versions.
I actually wanted to say that I prefer something like
real :: a,b
a = z'F'
b = z'3'
to the current
INTEGER :: a, b
DATA a / 'F'Z /, b / '3'Z /
and to the previous
INTEGER :: a = 'F'X, b = '3'X
Tobias