Hi I am new to Lazarus
I try to compile the following procedure, to list the files of a directory (Linux)
PROCEDURE ListFiles ( var Maske:AnsiString);
Var Info : SearchRec;
Count : Longint;
Begin
Count:=0;
If FindFirst ('*',faAnyFile and faDirectory,Info)=0 then
begin
Repeat
Inc(Count);
With Info do
begin
If (Attr and faDirectory) = faDirectory then
Write('Dir : ');
Writeln (Name:40,Size:15);
end;
Until FindNext(info)<>0;
end;
FindClose(Info);
Writeln ('Finished search. Found ',Count,' matches');
End;
I get the error Incompatible Types: Got "untyped" but expected "Int64"
If I compile with TSearchRec; instead of SearchRec; does not work either Error Call by var for arg no. 3 has to match exactly :Got TRawbyteSearchRec, expected SearchRec;
I am very puzzled, since I took the template for this procedure from a Lazarus programm