----- Original Message -----
From: "John Gilmore" <jwgli...@gmail.com>
To: <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Sent: Thursday, October 24, 2013 8:09 AM
Subject: Re: signum


Boolean values are bits in PL/I.

Writing, say,

declare (a,b, d) signed binary fixed(63,0), signum signed binary fixed(7, 0),
(bigger, equal, smaller) aligned bit ;

permits either

d = a - b ;
select ;
 when(d > 0) signum = +1 ;
 when(d = 0) signum =   0 ;
 when(d < 0) signum =  -1 ;
end ;

or

d = a - b ;
bigger =  (d > 0
equal =  (d = 0) ;
smaller = (d < 0) ;

but nothing quite like your REXX construct is available.

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);

Reply via email to