Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
11
Task/File-input-output/Delphi/file-input-output-1.delphi
Normal file
11
Task/File-input-output/Delphi/file-input-output-1.delphi
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var
|
||||
f : TextFile ;
|
||||
s : string ;
|
||||
begin
|
||||
AssignFile(f,[fully qualified file name);
|
||||
Reset(f);
|
||||
writeln(f,s);
|
||||
Reset(f);
|
||||
ReadLn(F,S);
|
||||
CloseFile(
|
||||
end;
|
||||
10
Task/File-input-output/Delphi/file-input-output-2.delphi
Normal file
10
Task/File-input-output/Delphi/file-input-output-2.delphi
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
var
|
||||
f : File ;
|
||||
buff : array[1.1024] of byte ;
|
||||
BytesRead : Integer ;
|
||||
begin
|
||||
AssignFile(f,fully qualified file name);
|
||||
Reset(f,1);
|
||||
Blockread(f,Buff,SizeOf(Buff),BytesRead);
|
||||
CloseFile(f);
|
||||
end;
|
||||
27
Task/File-input-output/Delphi/file-input-output-3.delphi
Normal file
27
Task/File-input-output/Delphi/file-input-output-3.delphi
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
type
|
||||
|
||||
tAddressBook = Record
|
||||
FName : string[20];
|
||||
LName : string[30];
|
||||
Address : string[30];
|
||||
City : string[30];
|
||||
State : string[2];
|
||||
Zip5 : string[5];
|
||||
Zip4 : string[4];
|
||||
Phone : string[14];
|
||||
Deleted : boolean ;
|
||||
end;
|
||||
|
||||
var
|
||||
f : file of tAddressBook ;
|
||||
v : tAddressBook ;
|
||||
bytes : integer ;
|
||||
begin
|
||||
AssignFile(f,fully qualified file name);
|
||||
Reset(f);
|
||||
Blockread(f,V,1,Bytes);
|
||||
Edit(v);
|
||||
Seek(F,FilePos(f)-1);
|
||||
BlockWrite(f,v,1,bytes);
|
||||
CloseFile(f);
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue