Hello,

Try running the following program and be amazed of the output:

    Program Test;

    Uses Sysutils;

    Begin
        WriteLn(StrToInt('x1'));
        WriteLn(StrToInt('x0'));
        WriteLn(StrToInt('xabcdef'));
    End.


Apparently the StrToInt function interprets strings starting with an `x`
as hexadecimal numbers? This behaviour seems rather strange to me
(strings starting with 0x would be a bit more understandable, but then
again, we're programming pascal here, not C) and it is not mentioned in
the documentation. What do I do with it?

A- File a bug concerning incomplete documentation?
B- File a bug concerning incorrect behaviour of StrToInt()?
C- Do nothing and live with it.
D- ....?


Additional information
 Compiler Version: 2.6.0

-- 
Ewald

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to