[gforth] Question about catch when using objects.fs

2015-01-20 Thread Philip Smith
Sample code follows * require objects.fs cr object class m: -2700 throw ;m method foo1 m: this ['] foo1 catch ;m method foo2 end-class foo : a -2800 throw ; : b ['] a catch ; foo heap-new constant fooy fooy foo2 .s 2drop cr \ output is as follows \ 2 -1230974988 -2700 b .s drop cr

Re: [gforth] Question about catch when using objects.fs

2015-01-20 Thread Josh Grams
On 2015-01-20 02:50PM, Philip Smith wrote: m: this ['] foo1 catch ;m method foo2 fooy foo2 .s cr 2 -1230974988 -2700 Yeah, you have to watch out for the stack depth when CATCH returns through THROW. It restores it to the original depth (minus the XT that you executed). So you still have space on