VB运行TIMER类型不匹配 财富值36

2016-03-30 16:03发布

没有出错的代码,出错的代码显示是这句,我反正看不出一个SUB会有什么错误

Private Sub Timer2_Timer()

提示类型不匹配

我设置了很多中断点,终于确认:只要Timer2被允许执行,直接报错,后面的代码不会执行

跪求大神解答


付费偷看设置
发送
1条回答

var  
h:array [1..2,1..20] of integer;  
hn:integer;  
procedure init;  
var i:integer;  
begin  
fillchar(h,sizeof(h),0);  
hn:=0;  
repeat  
inc(hn);  
read(h[1,hn])  
until eof;  
end;  
procedure doit;  
var i,j,n:integer;  
begin  
for i:=1 to 20 do h[2,i]:=1;  
n:=1;  
for i:=hn-1 downto 1 do  
begin  
for j:=i+1 to hn do  
if (h[1,i]>=h[1,j]) and (h[2,i]<h[2,j]+1)  
then h[2,i]:=h[2,j]+1;  
if n<h[2,i] then n:=h[2,i];  
end;  
writeln(n);  
end;  
begin  
init;  
doit;  
end.

一周热门 更多>