in reply to "Subroutine basics" What does -1 mean ?
"What's the meaning of exit -1 here ?"
No one has explicitly stated this yet, but the only way to know the answer is to ask the person who designed the code. Convention would say that return value should signal that the subroutine call failed in some way, but who is to say that the person who created this code was following convention? Your best hint is to inspect all the lines of code that call that subroutine and find a common pattern. Once you figure that out, remove the silly return codes and add some REAL exceptions instead.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Subroutine basics" What does -1 mean ?
by mr_mischief (Monsignor) on May 29, 2014 at 20:27 UTC |