[fpc-devel] Bug in FPC and declaring distinct types

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Sep 18 16:00:29 CEST 2008


On Thu, Sep 18, 2008 at 3:50 PM, Yury Sidorov <jura at cp-lab.com> wrote:
>
> It makes implementation of utf8string impossible using this approach...
>

I agree.  I created a distinct string type (TfpgString) in fpGUI. That
way I could ensure TfpgString is a UTF-8 string and String is a
AnsiString string. I replaced all String parameters with TfpgString
where UTF-8 strings are expected and hoped that the compiled would
complain and tell me where I tried to assign String to a TfpgString. I
got no complaints... and assumed all was okay. :-(

So that means my whole assumption of type safety has gone for a ball
of s**t!  (well used S.African expression)  ;-)


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list