[fpc-devel] BOOL

Hans-Peter Diettrich DrDiettrich2 at gmx.de
Mon Dec 15 12:54:37 CET 2014


Am 14.12.2014 um 16:51 schrieb Marco van de Voort:
> In our previous episode, Adriaan van Os said:
>> reveals 0 for False and -1 for True, where I had expected 0 for False and
>> 1 f
>> according to <http://msdn.microsoft.com/en-us/library/eke1xt9y.aspx> the
>> same
>> respectively in Visual Studio 2013.
> There is a C (99?) bool type, and a winapi (and much older) BOOL type. Two
> different libraries, two different headers, two different cases :-)
AFAIR Delphi defines some xxxBOOL types for the interpretation of 
*WinAPI function results*. If so, these types and values should be 
restricted to Windows platforms, not be used in general (cross-platform) 
code.

DoDi



More information about the fpc-devel mailing list