瀏覽代碼

+ Added StrToQWord

git-svn-id: trunk@4063 -
michael 19 年之前
父節點
當前提交
89d52a3be9
共有 2 個文件被更改,包括 10 次插入4 次删除
  1. 8 3
      rtl/objpas/sysutils/sysstr.inc
  2. 2 1
      rtl/objpas/sysutils/sysstrh.inc

+ 8 - 3
rtl/objpas/sysutils/sysstr.inc

@@ -795,11 +795,16 @@ begin
 end;
 
 
-function TryStrQWord(const s: string; var i: QWord): boolean;
+function TryStrQWord(const s: string; var Q: QWord): boolean;
+begin
+  Result:=TryStrToQWord(S,Q);
+end;
+
+function TryStrToQWord(const s: string; var Q: QWord): boolean;
 var Error : word;
 begin
-  Val(s, i, Error);
-  TryStrQWord:=Error=0
+  Val(s, Q, Error);
+  TryStrToQWord:=Error=0
 end;
 
 {   StrToIntDef converts the string S to an integer value,

+ 2 - 1
rtl/objpas/sysutils/sysstrh.inc

@@ -108,7 +108,8 @@ function TryStrToInt(const s: string; var i : integer) : boolean;
 function StrToInt64(const s: string): int64;
 function TryStrToInt64(const s: string; var i : int64) : boolean;
 function StrToQWord(const s: string): QWord;
-function TryStrQWord(const s: string; var i : QWord) : boolean;
+function TryStrQWord(const s: string; var Q : QWord) : boolean;
+function TryStrToQWord(const s: string; var Q : QWord) : boolean;
 function StrToIntDef(const S: string; Default: integer): integer;
 function StrToInt64Def(const S: string; Default: int64): int64;
 function StrToQWordDef(const S: string; Default: QWord): QWord;