function reduce(arrayTime:array of integer):Integer;
var
IntDate:Integer;
begin
//IntDate:=0;
IntDate:=arrayTime[0]-2000;
IntDate:=IntDate Shl 4;
IntDate:=IntDate+arrayTime[1];
IntDate:=IntDate Shl 5;
IntDate:=IntDate+arrayTime[2];
IntDate:=IntDate Shl 5;
IntDate:=IntDate+arrayTime[3];
IntDate:=IntDate Shl 6;
IntDate:=IntDate+arrayTime[4];
IntDate:=IntDate shl 6;
IntDate:=IntDate+arrayTime[5];
Result:=IntDate;
end;procedure ecode(IntDate:Integer;var pTemp:array of integer);
begin
pTemp[5]:=IntDate and 63;
IntDate:=IntDate Shr 6;
pTemp[4]:=IntDate and 63;
IntDate:=IntDate Shr 6;
pTemp[3]:=IntDate and 31;
IntDate:=IntDate Shr 5;
pTemp[2]:=IntDate and 31;
IntDate:=IntDate Shr 5;
pTemp[1]:=IntDate and 15;
IntDate:=IntDate Shr 4;
pTemp[0]:=(IntDate and 63)+2000;
end;
var
IntDate:Integer;
begin
//IntDate:=0;
IntDate:=arrayTime[0]-2000;
IntDate:=IntDate Shl 4;
IntDate:=IntDate+arrayTime[1];
IntDate:=IntDate Shl 5;
IntDate:=IntDate+arrayTime[2];
IntDate:=IntDate Shl 5;
IntDate:=IntDate+arrayTime[3];
IntDate:=IntDate Shl 6;
IntDate:=IntDate+arrayTime[4];
IntDate:=IntDate shl 6;
IntDate:=IntDate+arrayTime[5];
Result:=IntDate;
end;procedure ecode(IntDate:Integer;var pTemp:array of integer);
begin
pTemp[5]:=IntDate and 63;
IntDate:=IntDate Shr 6;
pTemp[4]:=IntDate and 63;
IntDate:=IntDate Shr 6;
pTemp[3]:=IntDate and 31;
IntDate:=IntDate Shr 5;
pTemp[2]:=IntDate and 31;
IntDate:=IntDate Shr 5;
pTemp[1]:=IntDate and 15;
IntDate:=IntDate Shr 4;
pTemp[0]:=(IntDate and 63)+2000;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货