Looks like there is a bug in the numeric code that's only triggered with
string subclasses.

Rick


On Tue, Sep 17, 2013 at 3:26 PM, Ruurd Idenburg <ru...@idenburg.net> wrote:

> Given this code:
>
> #!/usr/bin/rexx
> t1 = .test1~new(30)
> say t1 ':' t1~string ":" t1~class
> say
> say '-'~copies(80)
> say
> t2 = .test2~new(45)
> say t2 ':' t2~string ":" t2~class
> exit
>
> ::class test1 public subclass string
> ::method init
>      self~init:super
>      if (self+0)~datatype\='NUM' then do
>          raise syntax 93.904 array(1,self)
>      end
>      self~objectname = 'a Test1'
>
> ::class test2 public subclass string
> ::method init
>      self~init:super
>      if (self)~datatype\='NUM'then do
>          raise syntax 93.904 array(1,self)
>      end
>      self~objectname = 'a Test2'
>
> ... and this result:
>
> D:\Projects\Scripts>test
> 30 : 30 : The TEST1 class
>
>
> --------------------------------------------------------------------------------
>
>      27 *-*       raise syntax 93.904 array(1,self)
>       7 *-* t2 = .test2~new(45)
> Error 93 running D:\Projects\Scripts\test.rex line 27:  Incorrect call
> to method
> Error 93.904:  Method argument 1 must be a number; found "45"
>
> I'm curious why, in test2, 45 is considered not to be a 'NUM'.
>
>
> --
> Ruurd Idenburg
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to