VB6中数组类型arrays的上限值为何设为-1?
- 内容介绍
- 文章标签
- 相关推荐
本文共计355个文字,预计阅读时间需要2分钟。
如果数组没有项目,某些函数(如Split函数)将返回一个数组,其中上限为-1,下限为0。例如:Dim s() As String=Split(, ,) Debug.Print UBound(s) Debug.Print LBound(s) 在这种情况下,UBound将等于-1,LBound将等于0。
本文共计355个文字,预计阅读时间需要2分钟。
如果数组没有项目,某些函数(如Split函数)将返回一个数组,其中上限为-1,下限为0。例如:Dim s() As String=Split(, ,) Debug.Print UBound(s) Debug.Print LBound(s) 在这种情况下,UBound将等于-1,LBound将等于0。

