Re: [fpc-devel] BOOL / Comparing booleans - bad style

2014-12-15 Thread Jasper Neumann
Hello folks! MS>>> But the silly C programmer did "if (a == TRUE)". JN>> I have seen this kind of nonsense way too often, >> even in Pascal code. >>May I sincerely ask to include a hint/warning feature such as >> "Comparing booleans - bad style" >>in order to notify the programmer to think twic

Re: [fpc-devel] BOOL / Comparing booleans - bad style

2014-12-15 Thread DaWorm
Pascal is about readability. A sentence like "if this variable is true do that" reads better than "if this variable do that". The danger is only when the variable type and the constant representing TRUE are not compatible. In C, since TRUE is usually an untyped #define, that can be hard to deter