你是一下不就知道了
谢谢?
privatf1(x as integer,y as integer,z as integer)
x=2
y=4
z=6
end sub
privatf2(x as integer,byval y as integer,byval z as integer)
x=1
y=3
z=4
end sub
privatf3(byval x as integer,byval y as integer,byval z as integer)
x=3
y=8
z=9
end sub
private subcommand_click()
dim a as integer,b as integer ,z as integer
print
a=1
b=2
c=3
print tab(3);a,b,c
call f1(a,b,c)
print tab(3);a,b,c
call f2(a,b,c)
print tab(3);a,b,c
call f3
(a,b,c)
print tab(3);a,b,c
end sub
答案为什么是
1 2 3
2 4 6
1 4 6
1 4 6
byval 是传值,为什么在把a,b,c传给 ,x,y,z 时f3 的结果不是1 2 3。能具体说一下吗?谢谢,顺便说一下,在这些被调用的函数中,比如
privatf2(x as integer,byval y as integer,byval z as integer)
x=1
y=3
z=4
end sub
x=1
y=3
z=4
这三有什么作用?
如果 f2含有数学表达式,是不是把这些值传道这个函数并带如表达式?