Posted by chotiwallah on 11/18/05 12:43
Thomas Mlynarczyk wrote:
> Hi,
>
> It seems to be a generally adopted convention to have a function return
> FALSE in case of an error. But if a function is supposed to return a boolean
> anyway, one cannot distinguish anymore between the "normal" FALSE and the
> "error" FALSE. So why not using NULL instead to indicate an error? Are there
> drawbacks I am not aware of?
>
> Greetings,
> Thomas
But if a function is supposed to return a value that might be NULL one
cannot distinguish anymore between the "normal" NULL and the "error"
NULL.
just turns around the issue.
micha
[Back to original message]
|