Menu

#550 unary operator in IF or WHEN statement isn't handled correctly

v3.9.4
closed-fixed
5
2022-06-24
2020-09-13
No
 Using a unary operator in an IF statement fails with a syntax error at
 line 61  (in the attached REXX program)  with:

 Error 34 running "c:\unary.rex", line 61: Logical value not "0" or "1"


 Line 61 is:       61 +++ if (-0)  then say 'yes'


 This fails with all Regina REXXes from  3.2  to  3.9.3  inclusive.

 Numerous other REXX process the attached program without errors.



 In the Regina PDF document, under    2.5   Operators
                    and under    2.5.1 Arithmetic Operators

          -  Unary prefix.  Same as  0 - number.
          +  Unary prefix.  Same as  0 + number.




 ______________________________ Gerard Schildberger
1 Attachments

Discussion

  • Mark Hessling

    Mark Hessling - 2020-09-17
    • status: open --> open-fixed
    • assigned_to: Mark Hessling
     
  • Mark Hessling

    Mark Hessling - 2020-09-17

    This has been fixed in my working copy.

     
  • Mark Hessling

    Mark Hessling - 2021-11-02
    • status: open-fixed --> closed-fixed
    • Group: Next Release --> v3.9.4
     
  • Mark Hessling

    Mark Hessling - 2021-11-02

    This has been fixed in my working copy.

     
  • cniggeler

    cniggeler - 2022-06-24
    • summary: unary operator (in an IF or WHEN statement using an unary operator isn't being handled/processed correctly --> unary operator in IF or WHEN statement isn't handled correctly
     

Log in to post a comment.