I came across an is_equals()
function in a C API at work that returned 1 for non-equal SQL tables (false) and 0 for equal ones (true). I only realized it after running test cases on my code, one for the positive example and one for the negative and they both failed which at first made little sense. The code in the API does not have a bug as the output was recorded correctly in its documentation.
My questions – are there upside down worlds / parallel universes / coding languages where this logical NOTing is normal? Isn't 1 usually true? Is the coder of the API making an error?
-1, 1, 'string'
and I don't know what else is considered true, on the other hand,0, undefined, null, NaN, 'empty string'
is considered false. – Svetlana