I kind of like address SYSTEM, it's an intuitively clear idea for folks used to a C function system(). However, ooRexx does not have it, they offer anaddress CMD (on NT and OS/2) matching Regina address SYSTEM, and a Windows only RexxUtil RxWinExec() remotely related to Regina address CMD, actually a simplified address SYSTEM 'start', so far I never used it.
In an attempt to avoid RegUtil SysFileDelete(), because static Regina can't do that, I tried call SYSTEM 'del'whatever using a wannabe-portable...
/* ----------------------------- (wrap address SYSTEM 2020-03-17) *//* Regina uses an intuitive address SYSTEM for internal commands, *//* redirections, and pipes. Regina uses address CMD for external *//* commands, roughly that is an address SYSTEM 'start ... /WAIT'. *//* An ooRexx address CMD corresponds to Regina address SYSTEM, on *//* Windows ooRexx RexxUtil has RxWinExec() for external commands. */SYSTEM:procedureexposerc
parseversionSV.;callonFAILUREnameERROR
if(V==5.00)|(6<=V&V<7)thendoifV=5thenaddressSYSTEMarg(1)/* Regina */elseaddressCMDarg(1)/* (o)oRexx */return.RS<0/* 1: fail */end/* Kedit KEXX 5.xy not supported */exitERROR('Please edit procedure SYSTEM() for'SV)
Works as it should on Windows, presumably also for DOS or OS(2, with ooRexx or Regina. But it would be a seriously bad idea in any shell without a del command, e.g, a bash expecting rm, a clear showstopper for my portability dreams.
OTOH there are only two vital RexxUtil functions for my purposes:SysFileDelete (1st place with a huge margin), SysFileTree (limited to three arguments), and while SysMkDir() + SysRmDir() would be also nice they are less important, md + rd happen to work also for bash etc.
So now I wonder if static Regina could support a minimal subset of RegUtil as built-in functions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure what you mean by "static" regina, but once you've registered the RegUtil functions they are "built-in." They are just not part of the language because they are platform-dependent.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I kind of like
address SYSTEM
, it's an intuitively clear idea for folks used to a C functionsystem()
. However, ooRexx does not have it, they offer anaddress CMD
(on NT and OS/2) matching Reginaaddress SYSTEM
, and a Windows only RexxUtilRxWinExec()
remotely related to Reginaaddress CMD
, actually a simplifiedaddress SYSTEM 'start'
, so far I never used it.In an attempt to avoid RegUtil
SysFileDelete()
, because static Regina can't do that, I triedcall SYSTEM 'del'
whatever using a wannabe-portable...Works as it should on Windows, presumably also for DOS or OS(2, with ooRexx or Regina. But it would be a seriously bad idea in any shell without a del command, e.g, a bash expecting rm, a clear showstopper for my portability dreams.
OTOH there are only two vital RexxUtil functions for my purposes:
SysFileDelete
(1st place with a huge margin),SysFileTree
(limited to three arguments), and whileSysMkDir()
+SysRmDir()
would be also nice they are less important, md + rd happen to work also for bash etc.So now I wonder if static Regina could support a minimal subset of RegUtil as built-in functions.
Not sure what you mean by "static" regina, but once you've registered the RegUtil functions they are "built-in." They are just not part of the language because they are platform-dependent.