Negative Zero in Formatted Output

With PGI v19.4, is there a way to remove the negative sign in formatted FORTRAN output when a REAL variable is assigned -0.0?

Example Code:
PROGRAM negZero
REAL A, B
A = 0.0
B = -A
WRITE (,) B
END

With PGI v12.9, the output is: 0.000000
With PGI v19.4, the output is: -0.000000

Hi RA-ARA,

You can set the environment variable “FORTRANOPT=no_minus_zero” to revert to the old behavior. Note that this only effects printing. “B” will still contain a negative zero.

PGI 12.9 was actually in error and not compliant with IEEE by not supporting negative zero. This was addressed in the 15.1 release.

Example:

% a.out
   -0.000000
% setenv FORTRANOPT no_minus_zero
% a.out
    0.000000

Hope this helps,
Mat

The environment variable does just what we needed.
Thank-you!!!