azaria has asked for the wisdom of the Perl Monks concerning the following question:
I used -
eithersystem("a.exe") print $?
but both prints:$retVal = system("a.exe"); print "$retVal\n";
Any idea why i get 256 and not 3 ? any solution% C++ retVal : 3 % 256
___________________________________
C++ code looks -Thanks azariaint main() { cout << "C++ retVal: 3" << endl; return 3; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returned Code
by jettero (Monsignor) on Jun 15, 2008 at 10:33 UTC | |
by ikegami (Patriarch) on Jun 15, 2008 at 13:43 UTC | |
by jettero (Monsignor) on Jun 15, 2008 at 16:52 UTC | |
by ikegami (Patriarch) on Jun 15, 2008 at 17:01 UTC | |
by Anonymous Monk on Jun 15, 2008 at 13:42 UTC | |
|
Re: Returned Code
by hilitai (Monk) on Jun 15, 2008 at 13:42 UTC | |
by ikegami (Patriarch) on Jun 15, 2008 at 17:09 UTC | |
by cdarke (Prior) on Jun 16, 2008 at 09:49 UTC |