Many functions will return zero for success and non zero for fail.
the reasoning is that if it succeeded then that is all you need to
know. If it failed there may be more than one reason. returning a
failed code of '1' for one reason '2' for another. It is all there
to make programming easier although sometimes it doesn't seem it.
It is all very messy and inconsistent though I have to agree.
regards
Trevor

------------------
Leave a comment: