2017年纳智捷u6耗油吗:QB的问题单击command1,每行显示的内容

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/27 16:33:43
option explicit
private sub command1_click()
dim x as single ,i as integer
x=1.2
for i=1to 3
x=x*i
print fun1(x)
next i
end sub
private function fun1(x as single)as single
static y as single
y=y+x
fun1=y/2
end function
command1,每行显示的内容

显然QB是没有command 的
是VB的

每行显示的内容:
0.6
1.8
5.4

.6
1.8
5.4

用VB才行,QB会报错
VB结果:
.6
1.8
5.4

每行显示的内容:
0.6
1.8
5.4

0.6
1.8
5.4