[Whoops, missed the "Reply All" on this one and sent it just to Rony.
Resending to the list for completeness:]

On 1/27/2022 7:03 AM, Rony G. Flatscher wrote:
> You could try "call 'MyMath'" instead, which will cause the
> interpreter to run the external Rexx program and upon return will
> allow you access to all public routines and public classes defined
> in 'MyMath' (and all public routines and public classes 'MyMath' may
> bring in via ::requires directives of its own etc.).

No such luck--this has the same result of making the routines available
to my program, but not to tryrexx when my program calls it.

> If you wanted to define a routine dynamically in rexxtry.rex this 
> would be possible as well.

The whole point is that I don't want to modify rexxtry.rex.  But this
does suggest how to do it with minimal typing after rexxtry starts:
I can simply CALL MYMATH from there.

I did run into another dead end, in three different ways, in trying to
minimize it even further.  I thought maybe my program could define a
class method to do it that I could then call from rexxtry:

  ::Class ! Public
  ::Method ! Class
    Call MyMath

But again, this is only exposed to programs that call mine with
::REQUIRES, not to ones that mine calls.  I can pass the class as an
argument, but I still can't use it from rexxtry, because INTERPRET can't
issue USE ARG.  And if I try passing the class to another program and
using it there, I can call the method successfully, but that *still*
doesn't expose the routines to the called program.

¬R





_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to