小问题一个
四个赋值的参数若是各不相等,有没有比较简洁的方法表示的?
比如a b c d
除了这样表示if a<>b and b<>c ...
四个赋值的参数若是各不相等,有没有比较简洁的方法表示的?
比如a b c d
除了这样表示if a<>b and b<>c ...
2007-10-31 16:36
2007-10-31 16:56
2007-10-31 18:15
哈哈 写个函数
dim sum[3] as integer
sum[0]=a sum[1]=b sum[2]=c sum[3]=d
for i= 0 to 2
for k=i+1 to 3
compare(sum[i],sum[k])
next
next
private sub compare(x as integer,y as integer)
if x<>y then
msbbox("不相等")
else
msbbox(“相等”)
end if
end sub

2007-11-01 09:54
这个好像更麻烦。。
[此贴子已经被作者于2007-11-1 10:21:14编辑过]

2007-11-01 10:20
2007-11-01 10:28
2007-11-01 11:34
2007-11-01 11:49
2007-11-02 12:50
哈哈 写个函数
dim sum[3] as integer
sum[0]=a sum[1]=b sum[2]=c sum[3]=d
for i= 0 to 2
for k=i+1 to 3
compare(sum[i],sum[k])
next
next
private sub compare(x as integer,y as integer)
if x<>y then
msbbox("不相等")
else
msbbox(“相等”)
end if
end sub
NB!
这位朋友用的是VBC语言?!

2007-11-02 15:30