I have a ConsoleApplication which has a “Return 703” statement in its run event (this indicates a special “correct” answer).
The other application calls the ConsoleApplication using an asynchronous shell.
So, the console app (compiled) returns 703 (I’ve checked by issuing a “Print “I’m returning 703”” right before the return), but the calling shell’s ExitCode is 191…
Is that a boundary issue, like the shell using only a fixed integer’s length? Or some mapping is taking place? (then, how may I map 191 back to 703?).
I read this as “An exit code transmitted through the system"; I can be wrong, but I always assumed so.
This is a unexpected coincidence… I chose 703 randomly (already used 701 and 702, but not tried with them).
It turns out 703-(9th digit)=703-512=191, which happens to be a known number (192 being 64*3, often used). I was on the “192” track by mistake…
Alternatively you can define a extended number value id, 254 or something… That then tells your application to read the longer number from x-bytes of the result message.
Thanks.
Well, since I’m owning the console app, I’ve just defined codes inside the 0-255 range. Negative OS errors are rendered positive, out of bounds codes are moved to bounds and my 700-705 codes are now 70-75.