[fpc-devel] Re: fpc-devel Digest, Vol 40, Issue 28

2007-10-19 Thread L
I wrote: What about +-+000 and ++-+0 though? And does StrToInt in the current sysutils check this? An unhandled exception occurred at $0040A462 : EConvertError : +-000 is an invalid integer $0040A462 $0040172F To answer my own question: that one is invalid according to current sysutils

[fpc-devel] Re: fpc-devel Digest, Vol 40, Issue 28

2007-10-19 Thread L
Rather.. var i: integer; begin i:= StrToInt(s); if (s = '0') or (i 0) then writeln('S is an integer, and i is now: ', i) else writeln('S is not an integer: ', s); end; Alternatively: function IsInteger(s: string; i: integer); begin result:=