* some warning about uninitialized vars fixed by using out instead of var

git-svn-id: trunk@141 -
This commit is contained in:
florian 2005-05-29 15:18:30 +00:00
parent 21038de78d
commit 9c717f2a35
2 changed files with 8 additions and 6 deletions

View File

@ -87,7 +87,7 @@ interface
{# Returns true if value is a power of 2, the actual
exponent value is returned in power.
}
function ispowerof2(value : int64;var power : longint) : boolean;
function ispowerof2(value : int64;out power : longint) : boolean;
function backspace_quote(const s:string;const qchars:Tcharset):string;
function octal_quote(const s:string;const qchars:Tcharset):string;
function maybequoted(const s:string):string;
@ -629,7 +629,7 @@ uses
end;
function ispowerof2(value : int64;var power : longint) : boolean;
function ispowerof2(value : int64;out power : longint) : boolean;
{
return if value is a power of 2. And if correct return the power
}

View File

@ -23,6 +23,8 @@
}
unit widestr;
{$i fpcdefs.inc}
interface
uses
@ -41,8 +43,8 @@ unit widestr;
maxlen,len : SizeInt;
end;
procedure initwidestring(var r : pcompilerwidestring);
procedure donewidestring(var r : pcompilerwidestring);
procedure initwidestring(out r : pcompilerwidestring);
procedure donewidestring(out r : pcompilerwidestring);
procedure setlengthwidestring(r : pcompilerwidestring;l : SizeInt);
function getlengthwidestring(r : pcompilerwidestring) : SizeInt;
procedure concatwidestringchar(r : pcompilerwidestring;c : tcompilerwidechar);
@ -63,7 +65,7 @@ unit widestr;
globals;
procedure initwidestring(var r : pcompilerwidestring);
procedure initwidestring(out r : pcompilerwidestring);
begin
new(r);
@ -72,7 +74,7 @@ unit widestr;
r^.maxlen:=0;
end;
procedure donewidestring(var r : pcompilerwidestring);
procedure donewidestring(out r : pcompilerwidestring);
begin
if assigned(r^.data) then