[fpc-devel] Trying to understand the wiki-Page "FPC Unicode support"

Michael Schnell mschnell at lumino.de
Tue Dec 2 13:31:44 CET 2014


On 11/29/2014 07:55 AM, Jonas Maebe wrote:
> Exactly the same goes for converting strings with code page CP_NONE to 
> a different code page: your program is broken when it tries to do that,

While accessing an array beyond its bounds is not detectable at compile 
time and accessing an array beyond its bounds when range checking is 
switched off is technically not detectable at runtime, and hence 
*undefined* cant be avoided, the attempt to convert strings with code 
page CP_NONE to a different code page is easily detectable by the 
compiler, as we have predefined string variable type "brands" types 
here. Thus, if the outcome is *defined* *to* *be* *undefined* it can and 
should result in a compiler error message.

-Michael



More information about the fpc-devel mailing list