....
var
strs:tstringlist;
i,a:integer;
begin
strs:=tstringlist.create;
try
a:=0;
for i:=0 to 99 do
begin
strs.add(inttostr(a));
strs.add('');
inc(a,8);
end;
strs.savetofile('d:/test.txt')
finally
strs.free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
a:TextFile;
s:string;
i:integer;
begin
S:= '73AA0';
assignfile(a,opendialog1.FileName);
ReWrite(a);
begin
for i:=1 to 5 do
begin
S:=inttostr(strtoint(S)+2);
writeln(a,S);
end;
closefile(a);
end;
end;
晕 十六进制啊,这样
procedure TForm1.Button1Click(Sender: TObject);
var
a:TextFile;
s:string;
i:integer;
begin
S:= '$73AA0';
assignfile(a,opendialog1.FileName);
ReWrite(a);
begin
for i:=1 to 5 do
begin
S:=inttohex(strtoint(S)+2,2);
writeln(a,S);
end;
closefile(a);
end;
end;