From: "Paul Gilmartin" <[email protected]>
Sent: Thursday, October 24, 2013 10:47 AM


On 2013-10-23 17:33, robin wrote:

What? Rexx's    m = ( j > k ) - ( j < k );

would be exactly the same in PL/I.

However, you would never write it like that. It's just obfuscation.

simplest (and trivial-est) in PL/I is m = sign(j-k);

But beware: for extreme values of j and k this might result in
an undetected overflow (is this nowadays called an ON SIZE
condition?) and undesired results.

Any overflow is detected.

And anyway, how do you think that J > K is computed?

The comparison is performed by subtracting K from J
(without changing either J or K, of course).

Reply via email to