OK, I think I may have finally "got" it... if PL/I actually causes that
declaration to come out as x'0000000D', then I'd consider that a minor
internal bug.  In any case it is an internal implementation detail, and
anybody that depends on it gets what they deserve (horrible surprise) when
IBM changes how it's implemented.

Still can't see an RFE... One of the things you give up in an HLL is
control over the binary stuff that comes out of it.  Mind your own
business, and let the compiler do its thing.

To radically generalize: the fact that something is bad, or is just stupid,
is not sufficient reason to enact a law against it.

sas

On Fri, Aug 4, 2017 at 11:53 AM, Paul Gilmartin <
0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Fri, 4 Aug 2017 17:06:52 +0200, Bernd Oppolzer wrote:
> >
> >IMO, the case for the RFE could be
> >that programs that rely on the initialization of
> >
> >DCL SUM DEC FIXED (7) INIT (-0.1);
> >
> >with negative zero (X'0000000d')
> >should be flagged; this is bad practice, and I would like
> >such initializations to be flagged as ERROR (not only warning)
> >and to be told by the error message, that the initialization will be
> >POSITIVE zero from now on. (Losing decimal digits to the right of
> >the decimal point should only be a warning, IMO).
> >
> The designers of S/360 wisely avoided the "-0" silliness for fixed
> binary by choosing 2's complement ratner than the sign-magnitude
> used by the 7090.  This also avoids the need for a recomplement
> cycle dependent on the sign of the result.
>
> It would have been wiser to make the packed representation 10's
> complement rather than sign-magnitude for similar reasons:
> o No "-0".
> o Five times the range in the same storage.
> o Never a need for a recomplement cycle.
>
> I am not much swayed by the opposing arguments:
> o FORTRAN II relied on "-0" to indicate a blank input field.
> o Sign-magnitude is more legible than complement in a dump.
> o Some theorems in numerical analysis depend on symmetric range.
> o Possible overflow complementing a numbe is harmful.
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
sas

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to