Menu

#317 RexxRef "1.11.4. Message Terms" is wrong

5.1.0
closed
Erich
None
1
2025-05-02
2024-03-30
No

A clause (1.12) may be ... a message instruction...; a message instruction, in turn (1.12.6) may be a message term; and a message term (1.11.4) has a certain syntax. On p. 24, we read:

If the message term uses ~, the receiver method must return a result object

But this is, in the general case, plain wrong: the invoked method can just return or exit, without returning a result.

For example,

  .c~new~m
  say result
::Class c
::Method m
  Say "hi"
  --Implicit return

Prints "hi", and then "RESULT".

Discussion

  • Anonymous

    Anonymous - 2024-08-03

    I am attaching a patch.

     
  • Josep Maria Blasco

    Sigh. That was me, of course. I got "spambot protection engaged".

     
  • Josep Maria Blasco

    The patch was contaminated with a previous one. That one should work.

     
  • Erich

    Erich - 2024-08-18
    • status: open --> pending
    • assigned_to: Erich
     
  • Erich

    Erich - 2024-08-18

    Like any Term, a Message Term is part of an expression and must always return a result.
    In contrast, a Message Instructions has the same form as a Message Term, but is not required to return a result.

    Added some clarification with [r12867]

     

    Related

    Commit: [r12867]

  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel