精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● VB和Basic>>〓〓...算法和基础...〓〓>>Re:VB新手的两个问题

主题:Re:VB新手的两个问题
发信人: colincpq(晴天霹雳)
整理人: winsy(2003-03-07 10:03:22), 站内信件
【 在 laozn 的大作中提到:】
:1,如何一次过将一组没有规律的整数定义为数组,例如将
:   (7,9,8,45,63,98)--》A()
:   而不用先  DIM A(5) AS Integer
:     然后  A(0)=7
:           A(1)=9
:
:......
 
dim a() as String
dim str as string
dim intCount as Integer
str="7,9,8,45,63,98"
a() = Split(strLine, ",", -1, vbTextCompare)
intCount = UBound(a)

a() 就是得到的数组
intCount 就是数组的大小



----
 #晴天霹雳#

[关闭][返回]