[fpc-pascal] Possible bug in Numeric test

steveg steveg at nevets.com.au
Wed Feb 24 00:50:08 CET 2016


Not sure if this is considered a bug or not :)

I have found this function returns TRUE if passed 'E1/E2/etc'
I am guessing it is seeing the 'E' as exponent


function IsNum( const sSrc :string ) :boolean;
var
   Code :integer;
   Num :real = 0;
begin
   Num := Num;
   Val(sSrc, Num, Code);
   Exit( Code = 0 );
end;

Thanks - SteveG



More information about the fpc-pascal mailing list