The Package class has a loadPackage() method that is a dynamic version of ::REQUIRES. Just use
.context~package~loadPackage('winsys.cls') in your prolog code to add the package to your context if you're on Windows. Rick On Sun, Apr 4, 2021 at 12:57 PM Bill Turner, WB4ALM <wb4...@arrl.net> wrote: > I have a routine that functions under LINUX or under WINDOWS. > > It has additional functionality under WINDOWS, that needs a > ::REQUIRES "winsystm.cls" > statement. > > Obviously, that is not installed on a LINUX based system so it causes an > error > that the ".cls" can not be found. > > I do not want to maintain two different copies of the same ooRexx script > and > I use the PARSE SOURCE instruction to determine the current operating > system > and save this value for testing later in the program. > > Is there a way to > (1) conditionally control the execution of the ::REQUIRES statement or > (2) Trap that specific error so that t can be ignored? > > /s/ Bill Turner, wb4alm > > > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel