From: Rick M. <obj...@gm...> - 2009-03-25 19:19:37
|
Yes, I believe the docs are wrong there....I suspect as a result of the reworking of things in the API, but the current behavior is definitely cleaner. Rick On Wed, Mar 25, 2009 at 3:14 PM, Mark Miesfeld <mie...@gm...> wrote: > Last on my list for today Rick. <grin> > > As far as I can tell the return from RexxStart() is the same as that > in the converted return code parameter. In other words, in the > following, return_code and rc are always the same. > > return_code = RexxStart(1, /* one argument */ > argv, /* argument array */ > "CHANGE.ED", /* Rexx procedure name */ > NULL, /* use disk version */ > "Editor", /* default > address name */ > RXCOMMAND, /* calling as a subcommand */ > NULL, /* no exits used */ > &rc, /* > converted return code */ > &retstr); /* returned result */ > > In the above, if CHANGE.ED returns 54, then return_code is also 54. > The current docs indicate that any positive return is an error with > RexxStart() and imply the error number is an operating system error > number. 54 is, on Windows, The network is busy. > > I think the doc should be changed to just state that return_code and > rc (converted return code) are the same. (I'll do the rewirite.) > > But, I can't seem to track down, even using the debugger, where > arguments.rc gets updated. Are there any cases where return_code > would not equal rc? > > These 3 Rexx programs show what I mean, when run through RexxStart() > > /* Rexx */ > use arg i; return i > > C:\work.ooRexx\other\examples\4.0.examples>rxstart echoArg.rex > Invoke RexxStart() with program: echoArg.rex argument: 1 > ... RexxStart() return code=[1] | returned result value=[1] | > converted return code=[1] > --- > Invoke RexxStart() with program: echoArg.rex argument: 2 > ... RexxStart() return code=[2] | returned result value=[2] | > converted return code=[2] > --- > Invoke RexxStart() with program: echoArg.rex argument: 3 > ... RexxStart() return code=[3] | returned result value=[3] | > converted return code=[3] > --- > Invoke RexxStart() with program: echoArg.rex argument: 4 > ... RexxStart() return code=[4] | returned result value=[4] | > converted return code=[4] > --- > Invoke RexxStart() with program: echoArg.rex argument: 5 > ... RexxStart() return code=[5] | returned result value=[5] | > converted return code=[5] > > /* Rexx */ > use arg i; return i - 10 > > C:\work.ooRexx\other\examples\4.0.examples>rxstart echoArg.rex > Invoke RexxStart() with program: echoArg.rex argument: 1 > ... RexxStart() return code=[-9] | returned result value=[-9] | > converted return code=[-9] > --- > Invoke RexxStart() with program: echoArg.rex argument: 2 > ... RexxStart() return code=[-8] | returned result value=[-8] | > converted return code=[-8] > --- > Invoke RexxStart() with program: echoArg.rex argument: 3 > ... RexxStart() return code=[-7] | returned result value=[-7] | > converted return code=[-7] > --- > Invoke RexxStart() with program: echoArg.rex argument: 4 > ... RexxStart() return code=[-6] | returned result value=[-6] | > converted return code=[-6] > --- > Invoke RexxStart() with program: echoArg.rex argument: 5 > ... RexxStart() return code=[-5] | returned result value=[-5] | > converted return code=[-5] > --- > > /* Rexx */ > use arg i > > x = 3 / 0 > > return i - 10 > > C:\work.ooRexx\other\examples\4.0.examples>rxstart echoArg.rex > Invoke RexxStart() with program: echoArg.rex argument: 1 > 3 *-* x = 3 / 0 > Error 42 running C:\work.ooRexx\other\examples\4.0.examples\echoArg.rex > line 3: Arithmetic overflow/underflow > Error 42.3: Arithmetic overflow; divisor must not be zero > ... RexxStart() return code=[-42] | returned result value=[null > string] | converted return code=[-42] > --- > Invoke RexxStart() with program: echoArg.rex argument: 2 > 3 *-* x = 3 / 0 > Error 42 running C:\work.ooRexx\other\examples\4.0.examples\echoArg.rex > line 3: Arithmetic overflow/underflow > Error 42.3: Arithmetic overflow; divisor must not be zero > ... RexxStart() return code=[-42] | returned result value=[null > string] | converted return code=[-42] > --- > Invoke RexxStart() with program: echoArg.rex argument: 3 > 3 *-* x = 3 / 0 > Error 42 running C:\work.ooRexx\other\examples\4.0.examples\echoArg.rex > line 3: Arithmetic overflow/underflow > Error 42.3: Arithmetic overflow; divisor must not be zero > ... RexxStart() return code=[-42] | returned result value=[null > string] | converted return code=[-42] > --- > Invoke RexxStart() with program: echoArg.rex argument: 4 > 3 *-* x = 3 / 0 > Error 42 running C:\work.ooRexx\other\examples\4.0.examples\echoArg.rex > line 3: Arithmetic overflow/underflow > Error 42.3: Arithmetic overflow; divisor must not be zero > ... RexxStart() return code=[-42] | returned result value=[null > string] | converted return code=[-42] > --- > Invoke RexxStart() with program: echoArg.rex argument: 5 > 3 *-* x = 3 / 0 > Error 42 running C:\work.ooRexx\other\examples\4.0.examples\echoArg.rex > line 3: Arithmetic overflow/underflow > Error 42.3: Arithmetic overflow; divisor must not be zero > ... RexxStart() return code=[-42] | returned result value=[null > string] | converted return code=[-42] > --- > > ------------------------------------------------------------------------------ > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |