Re: [fpc-devel] StrToInt -- Strange behaviour

2013-02-21 Thread Ewald
Once upon a time, Marco van de Voort said: > In our previous episode, Ewald said: >> 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 the

Re: [fpc-devel] StrToInt -- Strange behaviour

2013-02-21 Thread Ewald
Once upon a time, Sven Barth said: > On 21.02.2013 21:01, Ewald wrote: >> >> 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 >> aga

Re: [fpc-devel] StrToInt -- Strange behaviour

2013-02-21 Thread Sven Barth
On 21.02.2013 21:01, Ewald wrote: 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

Re: [fpc-devel] StrToInt -- Strange behaviour

2013-02-21 Thread Marco van de Voort
In our previous episode, Ewald said: > 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)