Re: BOZ literal constants, a puzzle for us Standard-loving types.



In article <356dnb_0OfzhtpbbnZ2dnUVZ_tKjnZ2d@xxxxxxxxxxx>,
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> writes:

IBM OS/360 Fortran and VAX/VMS Fortran allow initializing REAL
variables with Z constants in DATA statements as bit patterns,
no REAL() needed or allowed. (Note that in both cases the ''s
are not used. DATA R/Z80C00000/) gfortran should supply a way
to initialize negative integers and bit pattern reals, for
both backward and forward compatibility.


There are no negative integers in gfortran. There is a unary
minus operator and whole numbers. :)

Bit patterns for reals can be done with TRANSFER. Yes, it isn't
portable, but REAL(BOZ) isn't portable either. I'm almost tempted
to suggest that J3 was smoking crack when it approved using BOZs
in REAL, INT, and CMPLX. It appears to be a broken attempt to
fix the broken semantics of TRANSFER.

--
Steve
http://troutmask.apl.washington.edu/~kargl/
.