Menu

#286 Rexxref example 3.3 does not apparently work

5.0.0
wont-fix
nobody
None
1
2021-10-25
2021-10-24
No

See attached program. Tried in 4.2.0 Win 10, 5.0.0 r12286 Debian 10.
According to the manual, the program should raise a syntax condition when attempting to set sizecontainer::size to a non-whole number.
Adding a trace statement to the attribute set body shows no activity.
I agree with the manual that this would be a useful feature for attribute validation, but it may be easier to change the manual to reflect what the interpreter appears to do.

1 Attachments

Discussion

  • Rick McGuire

    Rick McGuire - 2021-10-24
    • status: open --> wont-fix
     
  • Rick McGuire

    Rick McGuire - 2021-10-24

    You have an error in your program. The lines

    sc.size = 1 -- succeeds
    say sc.size

    don't invoke the attribute methods, but they are rather accessing the compound variable SC.SIZE. These lines should be

    sc~size = 1 -- succeeds
    say sc~size

    using the ~ to invoke the methods.

     
  • Geoff Stevens

    Geoff Stevens - 2021-10-25

    Oh, how dumb of me.
    Thanks for pointing out the error, Rick.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB