Dear
I have many warning like
(966,12) Hint: Local variable "X" does not seem to be initialized that X is a TextFile
I understand that only X is initialized when assign() it
How to prevent this warning ?? How to initialize a TextFile value...
example
procedure Xseen(line:string);
var
zDate:string;
myFile : TextFile;
xText:string;
TargetPath:string;
BEGIN
xText:='';
writeln('log::' + line);
TargetPath:='/var/log';
zDate:=DateToStr(Date)+ chr(32)+TimeToStr(Time);
xText:=zDate + ' ' + line;
TRY
AssignFile(myFile, TargetPath);
if FileExists(TargetPath) then Append(myFile);
if not FileExists(TargetPath) then ReWrite(myFile);
writeln(myFile, line);
CloseFile(myFile);
EXCEPT
END;
END;David Touzeau -------------------------- Linux Ubuntu 7.04 feisty
FreePascal-Lazarus,perl,delphi,php artica for postfix management console
(http://www.artica.fr) icq:160018849
