<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Drat, that was a bad assumption of mine - sorry<br>
<br>
I meant it fails for any of E1 or E2 entries<br>
so any entry beginning with E and then a following number<br>
<br>
eg: IsNum('E1');<br>
<br>
Sorry for the poor example<br>
<br>
<div class="moz-cite-prefix">On 25/02/16 03:54, Vojtěch Čihák wrote:<br>
</div>
<blockquote cite="mid:20160224182442.7AA6961E@atlas.cz" type="cite">
<p style="padding:0 0 0 0; margin:0 0 0 0;">I tried your function
in FPC 3.0.0 in mode ObjFPC and it returns False for
string 'E1/E2/etc'.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br>
> Od: steveg <a class="moz-txt-link-rfc2396E" href="mailto:steveg@nevets.com.au"><steveg@nevets.com.au></a><br>
> Komu: "FPC-Pascal users discussions"
<a class="moz-txt-link-rfc2396E" href="mailto:fpc-pascal@lists.freepascal.org"><fpc-pascal@lists.freepascal.org></a><br>
> Datum: 24.02.2016 00:57<br>
> Předmět: [fpc-pascal] Possible bug in Numeric test<br>
></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Not sure if this is
considered a bug or not :)<br>
<br>
I have found this function returns TRUE if passed 'E1/E2/etc'<br>
I am guessing it is seeing the 'E' as exponent<br>
<br>
<br>
function IsNum( const sSrc :string ) :boolean;<br>
var<br>
Code :integer;<br>
Num :real = 0;<br>
begin<br>
Num := Num;<br>
Val(sSrc, Num, Code);<br>
Exit( Code = 0 );<br>
end;<br>
<br>
Thanks - SteveG<br>
_______________________________________________<br>
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>