First of all, thanks to everybody who promptly answered my former question on email attachments.
My question of the day is: what mechanism can be used to (programmatically) test whether the execution of a Rebol script has been successful or not?
If I'm right, a script has no way to return an "exit code" which would provide the usual mechanism found on Unix. While it is true that the script might output the equivalent of a return code, this works fine provided that the script doesn't do any other kind of output. In other words, it'd be suitable for batch-oriented scripts which don't write anything else on stdout/stderr.
In my opinion, the formalized notion of a return code is essential, especially when one has to "glue" together scripts and/or applications and drive their execution by means of a higher-level program (e.g., a shell script), taking into account failures etc. The presence of the return code should also be transparent to the user, i.e. it shouldn't interfere with the execution of the script (like altering its output).
Any idea of why such a feature hasn't been incorporated in the language? Concerning cross-platform portability, a solution a la exit() is as portable as C.

Thanks for your help,

Mauro
 

Reply via email to