Explorar el Código

* Changed var to out parameters for strtoint*

git-svn-id: trunk@11314 -
michael hace 17 años
padre
commit
1ea2129c0d
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  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);
   result:=IntToHex(Int64(Value),Digits);
 end;
 end;
 
 
-function TryStrToInt(const s: string; var i : integer) : boolean;
+function TryStrToInt(const s: string; out i : integer) : boolean;
 var Error : word;
 var Error : word;
 begin
 begin
   Val(s, i, Error);
   Val(s, i, Error);
@@ -809,7 +809,7 @@ begin
 end;
 end;
 
 
 
 
-function TryStrToInt64(const s: string; var i : int64) : boolean;
+function TryStrToInt64(const s: string; Out i : int64) : boolean;
 var Error : word;
 var Error : word;
 begin
 begin
   Val(s, i, Error);
   Val(s, i, Error);
@@ -825,7 +825,7 @@ begin
 end;
 end;
 
 
 
 
-function TryStrToQWord(const s: string; var Q: QWord): boolean;
+function TryStrToQWord(const s: string; Out Q: QWord): boolean;
 var Error : word;
 var Error : word;
 begin
 begin
   Val(s, Q, Error);
   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: Int64; Digits: integer): string;
 function IntToHex(Value: QWord; Digits: integer): string;
 function IntToHex(Value: QWord; Digits: integer): string;
 function StrToInt(const s: string): integer;
 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 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 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 StrToIntDef(const S: string; Default: integer): integer;
 function StrToInt64Def(const S: string; Default: int64): int64;
 function StrToInt64Def(const S: string; Default: int64): int64;
 function StrToQWordDef(const S: string; Default: QWord): QWord;
 function StrToQWordDef(const S: string; Default: QWord): QWord;