首页 > 学识问答 >

vb6 数组赋值(vb数组赋值)

发布时间:2024-06-13 21:40:18来源:

2种方法1. 直接赋值。

此法只适合和小数组Dim myArray() as Integer ={1,2,3,4,5}或Dim myArray(5)as integermyArray(0)=1myArray(1)=2 myArray(2)=3 myArray(3)=3 myArray(4)=5 myArray(5)=62.最常用的for next循环赋值Dim myArray()as integerFor intCount as Integer= 0 to 5myArray(intCount)=你要赋值的东西Next如果你要每个都不同那就这样:Dim myArray()as integerDim FuZhi as integerFor Fuzhi as 0 to 5For intCount as Integer= 0 to 5myArray(intCount)=fuzhiNext intCountNext fuzhi。

免责声明:本答案或内容为用户上传,不代表本网观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。 如遇侵权请及时联系本站删除。