I could thing about a cmdline option for newlisp to keep it running.
This means I can call the newlisp.exe simply a second time and instead of starting a second instance it passes the cmdline-args to the running instance and call there a predefined function with it.
Sample:
Code: Select all
newlisp.exe -k funcname
The funcname is called on the second call of the exe and gets the cmdline-aruments of the second call passed.
Second or further call:
Code: Select all
newlisp.exe param1 param2 ....
Code: Select all
(funcname param1 param2 ....)
The running instance can be terminated as always by executing the (exit) funktion.
What do you think of such native support?
Of cource it would be possible to build such option with a custom exe with newlisp.dll
Benefit would be to hold huge data in memory with one loading and do processing on it with small individual calls. Kind of newlisp-state-mashine.
Or the other way round.
Start a normal instance and use this for the second call:
Code: Select all
newlisp.exe -r funcname param1 param2
Regards