Op 8/28/2022 om 8:45 PM schreef Ralf Quint via fpc-pascal:
On 8/28/2022 8:23 AM, James Richters via fpc-pascal wrote:
Running "i:\booltostr.exe "

-1

0

Why true is -1 instead of 1 is beyond me, but anyway, I would consider this BoolToInt, not BoolToStr,I want the Strings ‘TRUE’ or ‘FALSE’ as indicated in the documentation

Very logical in fact. 0 is NO bit set in any given size of boolean data type, -1 means ALL bits set on that same size boolean data type.

Pascal boolean datatypes only have 0 or 1 as defined values.  But probably it is for some COM or Winapi compatible purpose.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to