#613 External function registration 'lifetime'


In previous releases, I could register several external function packages one time per IPL (on Windows XP) and all REXX scripts started after that would have access to those external functions without needing to re-register. Now, each program must register external functions itself.

For example, in one program, I run, one time, after IPL:
call rxFuncAdd 'SockLoadFuncs', 'RXSOCK', 'SockLoadFuncs'
call SockLoadFuncs

and all other REXX scripts have access to the RXSOCK external functions without doing the same.

Is this an intentional change from previous releases? I didn't see it listed in changes/readme.


  • Mark Miesfeld

    Mark Miesfeld - 2009-04-16

    It is the consequence of an intentional change, that I suppose we didn't really think about.

    We did not anticipate that someone would write a program that required, say the rxsock external library, and not register the functions in that program. That their program would rely on some external program, hopefully, running first. It would seem a little less than robust. <grin>

    The loading of external function libraries is much improved.

    1.) You are guarenteed that the functions are really available.

    2.) It is much easier to load the external function library.

    For the rxsock library you can load the external library using this syntax:

    ::requires "rxsock" LIBRARY

    See the rxftp.cls and the socket.cls that are part of the distribution. They both use the rxsock library.

    The changes/readme does talk about the new native API, the new LIBRARY keyword, and the new way 'required' packages are handled.

    Maybe Rick can add a little more as to why the functions are not available to other programs that do not require / register the external functions in their program source. I know in general why, but I get a little hazy explaining it. Rick can explain the details better.

  • Brian Jongekryg

    Brian Jongekryg - 2009-04-16

    Yes, I understand what you mean about it not being "robust". But for those programs I write just for myself, it has always been easier. (Drawback though is for those programs that I do plan to share it makes it harder to make sure I do load the required function packages.) I guess it's time I break myself of this lazy habit.

  • Rick McGuire

    Rick McGuire - 2009-04-16

    This behavioral change only applies to libraries that have been converted to the new 4.0 package library style (which is the case for all of the libraries that ship with 4.0). These new libraries are only loaded in the process that uses them and is not dependent upon external registration with the rxapi daemon for use. You merely need to indicate that you require it.

    Compatibility has been extended to to RxFuncAdd() for programs that register the packages on their own behalf by first checking to see if the referenced library uses the new loading style and does the equivalent of a ::REQUIRES on the package.

  • Mark Miesfeld

    Mark Miesfeld - 2010-02-22

    Since the resolution is "Won't Fix" this should have been closed.



Cancel  Add attachments