mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 09:49:27 +02:00
Fix for Mantis #30734: Implement Delphi-compatible functions StrToUInt64(), StrToUInt64Def and TryStrToUInt64 as inline forwarders to the existing respective QWord functions
git-svn-id: trunk@34710 -
This commit is contained in:
parent
4091010b9f
commit
63f0c7a2c3
@ -928,6 +928,11 @@ begin
|
||||
if Error <> 0 then raise EConvertError.createfmt(SInvalidInteger,[S]);
|
||||
end;
|
||||
|
||||
function StrToUInt64(const s: string): UInt64;
|
||||
begin
|
||||
result:=StrToQWord(s);
|
||||
end;
|
||||
|
||||
function StrToDWord(const s: string): DWord;
|
||||
var Error: word;
|
||||
begin
|
||||
@ -949,6 +954,11 @@ begin
|
||||
TryStrToQWord:=Error=0
|
||||
end;
|
||||
|
||||
function TryStrToUInt64(const s: string; Out u: UInt64): boolean;
|
||||
begin
|
||||
result:=TryStrToQWord(s,u);
|
||||
end;
|
||||
|
||||
{ StrToIntDef converts the string S to an integer value,
|
||||
Default is returned in case S does not represent a valid integer value }
|
||||
|
||||
@ -989,6 +999,11 @@ begin
|
||||
if Error <> 0 then result := Default;
|
||||
end;
|
||||
|
||||
function StrToUInt64Def(const S: string; Default: UInt64): UInt64;
|
||||
begin
|
||||
result:=StrToQWordDef(S,Default);
|
||||
end;
|
||||
|
||||
{ LoadStr returns the string resource Ident. }
|
||||
|
||||
function LoadStr(Ident: integer): string;
|
||||
|
@ -122,14 +122,17 @@ function StrToInt(const s: string): Longint;
|
||||
function StrToDWord(const s: string): DWord;
|
||||
function StrToInt64(const s: string): int64;
|
||||
function StrToQWord(const s: string): QWord;
|
||||
function StrToUInt64(const s: string): UInt64; inline;
|
||||
function TryStrToInt(const s: string; Out i : Longint) : boolean;
|
||||
function TryStrToDWord(const s: string; Out D : DWord) : boolean;
|
||||
function TryStrToInt64(const s: string; Out i : int64) : boolean;
|
||||
function TryStrToQWord(const s: string; Out Q : QWord) : boolean;
|
||||
function TryStrToUInt64(const s: string; Out u : UInt64) : boolean; inline;
|
||||
function StrToIntDef(const S: string; Default: Longint): Longint;
|
||||
function StrToDWordDef(const S: string; Default: DWord): DWord;
|
||||
function StrToInt64Def(const S: string; Default: int64): int64;
|
||||
function StrToQWordDef(const S: string; Default: QWord): QWord;
|
||||
function StrToUInt64Def(const S: string; Default: UInt64): UInt64; inline;
|
||||
function LoadStr(Ident: integer): string;
|
||||
// function FmtLoadStr(Ident: integer; const Args: array of const): string;
|
||||
Function Format (Const Fmt : String; const Args : Array of const) : String;
|
||||
|
Loading…
Reference in New Issue
Block a user