F
fili
Unregistered / Unconfirmed
GUEST, unregistred user!
pcharm := pchar(cboCommand.Text);
pcharn := pchar(formatdatetime('yyyymmdd',now));
pchart := pchar(formatdatetime('hhmmss',now));
for i := 0 to length(cboCommand.Text)-1 do
begin
arecord.Command := pcharm;
end;
for j := 0 to length(formatdatetime('yyyymmdd',now))-1 do
begin
arecord.Date[j] := pcharn[j];
end;
for j := 0 to length(formatdatetime('hhmmss',now))-1 do
begin
arecord.time[j] := pchart[j];
end;
看到这个三个循环了吧,其实都一样的功能,现在想写成一个函数谁能帮忙:)
哈哈
pcharn := pchar(formatdatetime('yyyymmdd',now));
pchart := pchar(formatdatetime('hhmmss',now));
for i := 0 to length(cboCommand.Text)-1 do
begin
arecord.Command := pcharm;
end;
for j := 0 to length(formatdatetime('yyyymmdd',now))-1 do
begin
arecord.Date[j] := pcharn[j];
end;
for j := 0 to length(formatdatetime('hhmmss',now))-1 do
begin
arecord.time[j] := pchart[j];
end;
看到这个三个循环了吧,其实都一样的功能,现在想写成一个函数谁能帮忙:)
哈哈