解释下VB中compute是什么意思?

来源:百度知道 编辑:UC知道 时间:2024/05/21 11:07:53
过程定义中
private Sub compute(a as single, b as single)
这句子是什么意思,compute又是什么意思
private sub compute (a as single , b as single)
c1=a+b
c2=a-b
c3=a*b
c4=a/b
d=d+a+b
print "c1=";c1,"c2=";c2,"c3=";c3,"c4=";c4
print "d=";d
end sub
这行代码怎么放在代码框上怎么运行啊???

定义一个子过程
compute是子过程的名字
括号里的是子过程的参数
a和b是参数名
single是单精度浮点型,变量类型

补充:你要调用这段子过程。
call compute(a,b)
a,b为你要调用的参数,填入变量或常量。

变量类型