SourceForge has been redesigned. Learn more.
Close

#413 c2d should fail if result > numeric digits

v3.7
closed-duplicate
None
5
2013-08-19
2013-07-12
No

numeric digits 9
say c2d('3b9ac9ff') gives 999999999
say c2d('3b9aca00') gives 1000000000 according to Ansi should raise 'Invalid call to routine'

Discussion

  • Walter

    Walter - 2013-08-18

    amazing how fast one (i.e., me) Forgets!
    Had a 'discussion' with GS on that Topic today :-)

     
  • Mark Hessling

    Mark Hessling - 2013-08-18

    I presume this bug report should be for X2D and C2D? The examples and results provided apply to X2D.

     
  • Julian Levens

    Julian Levens - 2013-08-19

    Yes, quite right. My examples should actually have a trailing x after the literal, and as logically c2d('abcd'x) is the same as x2d('abcd') the bug would apply to both. I checked ANSI just to be sure and this is confirmed.

     
  • Mark Hessling

    Mark Hessling - 2013-08-19
    • status: open --> closed-duplicate
    • assigned_to: Mark Hessling
     
  • Mark Hessling

    Mark Hessling - 2013-08-19

    Duplicate of [#208]. Due to potential serious breakage in existing Rexx programs, the current default behaviour of Regina will remain; ie x2d('3b9aca00') will not raise an error. However with Regina's OPTIONS STRICT_ANSI this error IS trapped.

     

    Related

    Bugs: #208

  • Julian Levens

    Julian Levens - 2013-08-19

    I should have found the duplicate myself. OTOH, the docs (C2D and X2D) are not clear on this point

     
  • Walter

    Walter - 2013-08-19

    after all I an proud to, I think, have been the author of 208 :-)

     
  • Mark Hessling

    Mark Hessling - 2013-08-19

    Documentation for C2D and X2D have been changed to indicate that an error occurs if the returned number exceeds NUMERIC DIGITS and STRICT_ANSI option is in effect.

     

Log in to post a comment.