Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Ersatz für TryStrToInt? (https://www.delphipraxis.net/99012-ersatz-fuer-trystrtoint.html)

hincapie 5. Sep 2007 15:12


Ersatz für TryStrToInt?
 
Hallo,
ich suche nach einem Ersatz für die Funktion TryStrToInt, da ich D5 verwende und D5 diese Funktion nicht kennt. :(
Auch die Suche und Google konnten mir nicht weiterhelfen.
Hat vielleicht jemand eine entsprechende Funktion zur Hand? :angel:
Wäre nett... :-D

jakobwenzel 5. Sep 2007 15:15

Re: Ersatz für TryStrToInt?
 
So machens die Borländer:
Delphi-Quellcode:
function TryStrToInt(const S: string; out Value: Integer): Boolean;
var
  E: Integer;
begin
  Val(S, Value, E);
  Result := E = 0;
end;

ConstantGardener 5. Sep 2007 19:38

Re: Ersatz für TryStrToInt?
 
...schau mal unter StrToIntDEF (Value,Def) ...

gruß ConstantGardener

hincapie 6. Sep 2007 07:01

Re: Ersatz für TryStrToInt?
 
an alle: Danke schön! :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:18 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz