L
Lars Uffmann
If I define a function, that shall return -1 in case of error, and a
positive value otherwise:
int foo (int param) {
if (outOfRange (param))
return -1;
return (param != 0);
}
can I rely on this code always working, or is it possible that the
return statement produces a -1 also, on a specific compiler / OS?
Is this defined somewhere? And if so, where in the standard?
Best Regards,
Lars
positive value otherwise:
int foo (int param) {
if (outOfRange (param))
return -1;
return (param != 0);
}
can I rely on this code always working, or is it possible that the
return statement produces a -1 also, on a specific compiler / OS?
Is this defined somewhere? And if so, where in the standard?
Best Regards,
Lars