On 10/14/2011 02:04 PM, Paul Ishenin wrote:
Just think of Pos() as it only compares bytes.

A full-time programmer can be trained to think that way. (He also can be trained to do ASM.)

For a student, a "sometimes" - programmer, a hobbyist, someone who just uses Pascal to create some testing/supporting tools for his hardware devices, web programming or whatever, and lots of others (you name it), thinking that way is out of question. They have no notion whatever of Unicode implementation details.

For them, a string is just a sequence of visible characters (no idea how Chinese think about that). The language constructs need to work accordingly. This includes Pos() and Length() (which of course might come with modified names in a Unicode aware RTL) and language features like MyString[i]. And of course a "char" needs to be able to hold any visible character for them.

-Michael
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to