vb,数组,如何只找出其中某一维的大于某数的 数组.请看补充.

来源:百度知道 编辑:UC知道 时间:2024/05/11 15:19:18
如数组aa(8,2,3,7,6) as integer
其中aa(1,1,1,1,1)=5
aa(2,1,2,1,2)=3
aa(3,2,2,2,2)=7……
我想找出 值aa>5 的数组中,第一维数组的值有哪些。
如上例,aa(8,2,3,7,6) as integer,其中值大于5的数组其第一维的数是几。上例中,aa(3,2,2,2,2)=7,我想把第一维的3找出来。

说明:为了输出结果,新建一个text1控件,一下为程序代码:
dim a,b,c,d,e,aa(8,2,3,7,6) as integer
aa(1,1,1,1,1)=5
aa(2,1,2,1,2)=3
aa(3,2,2,2,2)=7
for a=0 to 7
for b=0 to 1
for c=0 to 2
for d=0 to 6
for e=0 to 5
if aa(a,b,c,d,e)>5 then text1.text=a
next e
next d
next c
next b
next a

不知所云