Everything seems to be somewhat more interesting. d is the hexadecimal notation of 13. Try TryStrToInt ('x101', WrkNum).'x101' returns 257 for me
For hexadecimal values, the prefix '0x' or 'x' (case insensitive) may be used as well.There it is: Your 'xd' is interpreted as a hexadecimal number and 'd' is a valid Hex-Symbol
Morons: 99 is already a number and not a string!!! And so the result is false. Programmer error....
There it is: Your 'xd' is interpreted as a hexadecimal number and 'd' is a valid Hex-SymbolWell, yes, Cap said: reading documentation is always helpful. :)
Morons: 99 is already a number and not a string!!! And so the result is false. Programmer error....As marcov said, it's not a programmer error (except maybe not checking the result of TryStrToInt). bonmario simply set WrkNum to some defined value to show that TryStrToInt changes that variable due to the successful conversion of xd to 13.