Rick, Thanks to your doing things right, some programs now produce different results in 4.0 than in 3.2.0. <grin>
Take this example /* runRexx.rex */ 'rexx rexxPrg.rex' say 'return:' rc /* rexxPrg.rex */ return -35 In 3.2.0, runRexx.rex produces: return: 65501 while in 4.0.0 it produces return: -35 The reason being that in 3.2.0 they had this goofy construct in rexx.c: LONG rexxrc = 0; /* return code from rexx */ ... rc=REXXSTART((LONG) argcount, /* number of arguments */ ... (PSHORT)&rexxrc, /* Rexx program output */ ... return rc ? rc : rexxrc; // rexx program return cd which, since rexxrc was a long, had the effect of converting -35 to its unsigned short value of 65501. Since you cleaned up all that code up and made rexxrc a short, as it should have been all along, in 4.0 -35 is returned. Well, there is actually another change that complicates things a little more. In 3.2.0, for: rc=REXXSTART(... rc is 0 for the simple program, while in 4.0.0, it is -35. Anyhow, I'm not sure what the best thing to do here is. In 3.2.0, if rc was -35 then -35 was returned. It was only when rc was 0, that the mistake of making rexxrc a LONG came into play. Personally, I'd like to say that the 3.2.0 code was a bug, that is now fixed in 4.0.0. It was a bug. But, I know there are programs out there that rely on the bug. -- Mark Miesfeld ------------------------------------------------------------------------------ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel