File txt lazarus / 13-General ---------------------------------------------------------------------- Anonymous · 2005-11-28 20:57 Hi, I can't create a file txt I have this procedure procedure TfrmFattura.lpCreaFileTesto; var    loFile : File; begin    Assign(loFile,'MyFile.txt'); //HERE I Have the error    Rewrite(loFile);    Writeln(loFile,'Hello World');    //Flush(loFile);    Close(loFile); end;     the error is "Wrong number  of parameters specified" Can you help me? ---------------------------------------------------------------------- matthijs · 2005-11-28 21:58 Instead of Assign use AssignFile. ---------------------------------------------------------------------- berghem · 2005-11-29 20:23 Thank's, but now I have another problem, The my procedure create the file txt, but don't  write nothing The file is empty, WHY? procedure TfrmFattura.lpCreaFileTesto; var loFile : File; begin AssignFile(loFile,'MyFile.txt'); //HERE I Have the error Rewrite(loFile); Writeln('Hello World'); CloseFile(loFile); end; ---------------------------------------------------------------------- matthijs · 2005-11-29 22:39 Because you don't write anything to the file? ---------------------------------------------------------------------- Giuseppe Ridinò · 2005-11-30 09:45 Quote from: "berghem"... Writeln('Hello World'); You are not specifying where to write the string! Try to replace that line with Code: [Select]Writeln(loFile,'Hello World');