On Sun, 4 Apr 2021, at 17:56, Bill Turner, WB4ALM 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...
Would it work to make the bulk of your code work within a (possibly very large) subroutine, then have two initial rexx execs, one for each platform? The windows initial exec would have the extra ::REQUIRES in it but the linux one would not. Each would do virtually nothing except pass control to the subroutine. I do something a little like that to have ooRexx stubs pass control to Kexx edit macros (which are /not/ called by starting Kedit first) but are run entirely as subroutines under the ooRexx interpreter. The macros also run from the commandline in Kedit (which is why they are written in Kexx not ooRexx). Alternatively, create a dummy winsystm.cls file which contains only as much as it has to for ooRexx not to fall over when it attempts to load/initialise it, or whatever it normally does with a .cls file. -- Jeremy Nicoll - my opinions are my own. _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel