otherwise, you can replace the requires directive with a call in your code parse source os . if os = 'WindowsNT' then call 'Winsystm.cls'
hth Jon On Sun, 4 Apr 2021 at 18:12, Enrico Sorichetti via Oorexx-devel < oorexx-devel@lists.sourceforge.net> wrote: > NO to both questions > > I had the same need and a one liner solved the problem > As … one line of useful code > > The source code > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > */ > #include <errno.h> > #include <stdint.h> > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > > #include "oorexxapi.h" > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > */ > RexxRoutine1( logical_t, rxLoader, CSTRING, L ) > { > return ( context->LoadLibrary( L ) ); > } > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > */ > RexxRoutineEntry rxLoader_functions[] = > { > REXX_TYPED_ROUTINE( rxLoader, rxLoader ), > REXX_LAST_ROUTINE() > } ; > > RexxPackageEntry rxLoader_package_entry = > { > STANDARD_PACKAGE_HEADER > REXX_INTERPRETER_5_0_0, > "rxLoader", "1.0.0", > NULL, NULL, > rxLoader_functions, > NULL > } ; > > OOREXX_GET_PACKAGE( rxLoader ) ; > > > > How to use it > ... > ... > ... > > lib = "somelibrary" > if \ rxloader( lib ) then do > say "'"this"' error loading library '"lib"'" > exit ( -1 ) > end > ... > ... > ... > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > */ > ::requires "rxloader" library > > > > > On 4 Apr 2021, at 18:56, Bill Turner, WB4ALM <wb4...@arrl.net> wrote: > > 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? > > > _______________________________________________ > 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