ARG DEBUG
IF DEBUG = 'DEBUG' THEN ,
  TRACE I
TRUE = (1-1=0 & 4¬=6)
TVAL = '0011'||X2B(D2X(TRUE))
SAY 'TRUE = 'TRUE
SAY 'TVAL = 'TVAL
IF TRUE THEN SAY 'TRUE'
IF TVAL THEN SAY 'TVAL'
IF ¬TRUE THEN SAY 'NOT TRUE'
IF ¬TVAL THEN SAY 'NOT TVAL'
EXIT 0
 
gives (in ASCII):
 
TRUE = 1
TVAL = 00110001
TRUE
TRUEFALS(9): Error #34, Logical value not 0 or 1
IF TVAL THEN SAY 'TVAL'

PRESS ANY KEY TO CONTINUE.
 
;-)
 


On 07/09/2020 03:23, Paul Gilmartin wrote:
> On Mon, 7 Sep 2020 02:31:33 +0100, CM Poncelet wrote:
>
>> In the following example,
>> TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more appropriate],
>> it is then sufficient e.g. to code:
>> IF 4 ¬= 6 & TRUE THEN <whatever>
>> ELSE IF ¬TRUE THEN <whatever else>
>>  
>> I.e. TRUE can be defined as a Boolean '1'b in REXX, as per above.
>>
> No.  In Rexx the only legal Boolean values are:
>        FALSE        TRUE
>     '11110000'b  '11110001'b  EBCDIC
>     '00110000'b  '00110001'b  ASCII
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> .
>

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