A
andrew.may
Guest
The pre-OO way of doing this would be to have the util code running in persistent procedures & for individual programs to run internal procedures or functions in those libraries e.g. create a library “libMath.p" then in client code... DEF VAR hLibMath AS HANDLE NO-UNDO. RUN libMath.p PERSISTENT SET hLibMath. /* ... snip ... */ RUN toRadians IN hLibMath (INPUT degrees, OUTPUT radians). /* or ... */ radians = DYNAMIC-FUNCTION("toRadians" IN hLibMath, INPUT degrees). N.B. you'll have to consider how to manage the lifecycle of the persistent procs. some options to consider are... load them as session super-procs & leave them running for the lifetime of the session. have some library-manager that loads & passes out proc-handles to procedures that need to use a library start them at the top of a ".p" & clean them up in FINALLY blocks
Continue reading...
Continue reading...