Hi Christian,

This is not a problem coding such a simple function, but I usually
prefer use something that already exist to avoid code being
duplicated. There are so many functions I still don't know in
lazarus/fpc that I sure someone already had the problem before me and
coded a solution.

This is why I was asking. It take more time that doing the function
itself, but the end result is that I use the provided libraries. I
like that better :)

Best regards.

2006/6/27, Christian U. <[EMAIL PROTECTED]>:
FUNCTION IsNumeric(s: STRING): boolean;
VAR
  i: integer;
BEGIN
//TODO:Replace ',' with Systemdelemiter
  Result := (length(s) > 0);
  FOR i := 1 TO length(s) DO
    IF NOT ((Char(s[i]) IN ['0'..'9']) or (Char(s[i]) = DecimalSeparator)
or (Char(s[i]) = '-') or (Char(s[i]) = '+')) THEN
      BEGIN
        Result := False;
        exit;
      END;
END;

regards
Christian

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



--
Alexandre Leclerc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to