I tried your function in FPC 3.0.0 in mode ObjFPC and it returns False for string 'E1/E2/etc'. V. ______________________________________________________________
Od: steveg <ste...@nevets.com.au> Komu: "FPC-Pascal users discussions" <fpc-pascal@lists.freepascal.org> Datum: 24.02.2016 00:57 Předmět: [fpc-pascal] Possible bug in Numeric test
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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal