Re: [fpc-pascal] Possible bug in Numeric test

2016-02-27 Thread steveg
Drat, that was a bad assumption of mine - sorry I meant it fails for any of E1 or E2 entries so any entry beginning with E and then a following number eg: IsNum('E1'); Sorry for the poor example On 25/02/16 03:54, Vojtěch Čihák wrote: I tried your function in FPC 3.0.0 in mode ObjFPC and it

Re: [fpc-pascal] Possible bug in Numeric test

2016-02-24 Thread Bart
On 2/24/16, steveg wrote: > Not sure if this is considered a bug or not :) Fully compatible with Delphi 7. {$apptype console} {$ifdef fpc} {$mode objfpc} {$h+} {$codepage utf8} {$endif} {$R+} uses classes,sysutils; function IsNum( const sSrc :string ) :boolean; var Code :integer; Num

Re: [fpc-pascal] Possible bug in Numeric test

2016-02-24 Thread Vojtěch Čihák
Oh, I didn't catch it. So there must be some checking for E in the string - at least on the first place - because strings 'E' and '1E' returns FALSE.  __ Od: Nitorami Komu: Datum: 24.02.2016 22:22 Předmět:

Re: [fpc-pascal] Possible bug in Numeric test

2016-02-24 Thread Nitorami
Steve probably means "when passed 'E1' or 'E2' etc." Indeed IsNum ('E1') interprets it as zero and delivers TRUE. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Possible-bug-in-Numeric-test-tp5724297p5724319.html Sent from the Free Pascal - General mailing lis

Re: [fpc-pascal] Possible bug in Numeric test

2016-02-24 Thread Vojtěch Čihák
I tried your function in FPC 3.0.0 in mode ObjFPC and it returns False for string 'E1/E2/etc'.   V. __ Od: steveg Komu: "FPC-Pascal users discussions" Datum: 24.02.2016 00:57 Předmět: [fpc-pascal] Possible bug in Numeric test Not su