Ver Fonte

* Changed var to out parameters for strtoint*

git-svn-id: trunk@11314 -
michael há 17 anos atrás
pai
commit
1ea2129c0d
2 ficheiros alterados com 6 adições e 6 exclusões
  1. 3 3
      rtl/objpas/sysutils/sysstr.inc
  2. 3 3
      rtl/objpas/sysutils/sysstrh.inc

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

@@ -783,7 +783,7 @@ begin
   result:=IntToHex(Int64(Value),Digits);
 end;
 
-function TryStrToInt(const s: string; var i : integer) : boolean;
+function TryStrToInt(const s: string; out i : integer) : boolean;
 var Error : word;
 begin
   Val(s, i, Error);
@@ -809,7 +809,7 @@ begin
 end;
 
 
-function TryStrToInt64(const s: string; var i : int64) : boolean;
+function TryStrToInt64(const s: string; Out i : int64) : boolean;
 var Error : word;
 begin
   Val(s, i, Error);
@@ -825,7 +825,7 @@ begin
 end;
 
 
-function TryStrToQWord(const s: string; var Q: QWord): boolean;
+function TryStrToQWord(const s: string; Out Q: QWord): boolean;
 var Error : word;
 begin
   Val(s, Q, Error);

+ 3 - 3
rtl/objpas/sysutils/sysstrh.inc

@@ -114,11 +114,11 @@ function IntToHex(Value: integer; Digits: integer): string;
 function IntToHex(Value: Int64; Digits: integer): string;
 function IntToHex(Value: QWord; Digits: integer): string;
 function StrToInt(const s: string): integer;
-function TryStrToInt(const s: string; var i : integer) : boolean;
+function TryStrToInt(const s: string; Out i : integer) : boolean;
 function StrToInt64(const s: string): int64;
-function TryStrToInt64(const s: string; var i : int64) : boolean;
+function TryStrToInt64(const s: string; Out i : int64) : boolean;
 function StrToQWord(const s: string): QWord;
-function TryStrToQWord(const s: string; var Q : QWord) : boolean;
+function TryStrToQWord(const s: string; Out 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;