数组传递给函数
函数
Bool SetClock(Addr as integer,Itime() as Date)
参数说明:
Addr 与第三个函数相同。
Itime() 是一个日期型的一维数组,它的每个元素代表一个打铃时间点。最多只能设置13个打铃的时间点。
NOTE:使用者务必注意Itime() 数组的每个元素是以“HH:MM:SS”形式的日期数据。不要把“YY/MM/DD”格式的数据传给数组。
RETURN:设置成功返回TRUE,否则返回FALSE。
Example:
Var
Addr:integer;
BooleanFlag:Boolean;
Itime:array[1..13] of Ttime;
BooleanFlag:=Object.setclock(addr,Itime);
程序
procedure TF_KQDLL.Button1Click(Sender: TObject);
var
tt:array[1..13] of Ttime;
begin
TT[1]:=StrToTime(FormatDateTime('HH:MM:SS',now));
.
.
.
TT[13]:=StrToTime(FormatDateTime('HH:MM:SS',now));
KQDLL.setclock(21,TT);
end;
提示
[Error] U_KQDLL.pas(95): Type not allowed in OLE Automation call
[Fatal Error] KQDLL.dpr(5): Could not compile used unit 'U_KQDLL.pas'