Return codes
BlitzMax Forums/BlitzMax Programming/Return codes
| ||
Anyone know if it's possible to specify a return code that a Max program will use when it exits? I could really do with this as I'm calling some executables from a Perl script and want to be able to detect errors without scraping STDOUT for error messages. Cheers Muttley |
| ||
Not currently. But I've just knocked together a tweak to brl.appstub which let's me do this on Mac : SuperStrict ExitCode = 4 $ ./untitled1.debug $ echo $? 4 which is kind of what you want. |
| ||
You can use exit_(exitcode%)to return a exit code. |
| ||
Thanks all, I'll use Tommo's solution as no core module changes are required. :) Muttley |