[fpc-pascal] TIniFile: how to save bool as string?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Oct 3 22:40:01 CEST 2014


On 2014-10-03 20:16, silvioprog wrote:
> Is there any way to save these values ​​as string (true/false) instead of
> integer (0/1)? 

Yes, simply create a descendant of TINIFile, override the WriteBool()
virtual method and use BoolToStr() instead of BoolToChar() in its
implementation.

The same then needs to be done for ReadBool() as well.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/



More information about the fpc-pascal mailing list