On 2017-08-27 21:12, Paulo Costa wrote:
On 27-Aug-17 23:47, Dmitry Boyarintsev wrote:
Is 2 neither true, nor false? 3? 4?

If false is zero,
Then true is not false.

Also C doesn't have a boolean type per se. Iirc it was introduced in some version of c++ standard.

In C it's very strange to see code like that:

If (b==1)

It's always
If (b)
Or
If (!b)

Of course, that is because, in C, any value that is not zero, is true.

So you can not compare with 1 or -1 or any other value to test if it is true...

Paulo Costa

There were some very rare edge cases, that occur, though, I have heard, where... this is not the case.

But I would have to take the time to look up the article where I found this...

It could even be a rumor, but I think it is serious..

Since it is an edge case, it creeps in like sh*t when you don't expect it.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to