Thanks for usefull tips.
Indent options are in Tools>options>editor options>source options(I have default options and not sure what to change)
I have finished subdirectory search part today and everything works fine.
Thanks. Now I got it working.
Well the problem was the filelist was declared in private. I moved it to var(Where Tform is)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Filelist: TStrings;
implementation
Sorry but Delphi does not...
Filelist is defined as private variable. If I define it in procedure itself it does not work same if I create it. However it works find with memo. Possibly tstrings are conflicting somehow.
procedure TForm1.Open1(Sender: TObject);
var Path : string;
var searchResult : TSearchRec;
begin
if...
var Filelist: TStrings;//List of files
var Path : string;//file directory
var searchResult : TSearchRec;//search result
Everything is working for me except getting the file path to file list. I can run it, but this line always causes error.
Filelist.Add(Path +'\'+searchResult.name);
Thanks it works fine, now just need to create new file and use it(instead using existing one). Well dont understand how exactly amount_read works, but thats minor problem. Thanks for solution I think can do the rest myself.
procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
var NewFileName: string;
var MyFile: File;
var unit1 : byte;
begin
Memo1.Clear;
{$I+}
For i:= 0 to Filelist.Count - 1 do
begin
AssignFile(Myfile, Filelist[i]);
Reset(Myfile,1);
Blockwrite(MyFile, unit1,20)...
var
myfile, Newfile: File;
unit1: array[1..20] of byte;
begin
AssignFile(myfile, 'test.dat');
reset(myfile, 1);
blockread(myfile, unit1, sizeof(unit1));
CloseFile(myfile);
end.
K I use block read, but I want to skip first block and read and write the rest to new file.
Sorry for...
Hi I have nearly finished converting program, but what looked easy is impossible to finish for me. Its image(picture) file btw
First I assign file(that works fine)
AssignFile(Myfile, Filelist[i]);
If I managed to convert it to string I would simply type
Delete(Myfile,1,20)
But I did not find...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.