VB 脚本 - 动态数组 [英] VB Script - Dynamic Arrays

查看:19
本文介绍了VB 脚本 - 动态数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解动态数组初始化.在下面的代码中,为什么即使输入y"的值也没有设置数组大小.即使将 Y 的值设置为 4、5 或任何值后,Lbound 和 Ubound 仍显示为 0.

I would like to understand the dynamic array initializing. In the below code why the array size is not being set even after entering the value of "y". And both Lbound and Ubound is showing as 0 even after giving values to Y as 4, 5 or anything.

请给我解释一下.谢谢.

Please explain this to me. Thank You.

Dim i

Redim arr(y)

y = cint(InputBox("Enter value of y"))

Msgbox Lbound(arr)

Msgbox Ubound(arr)

推荐答案

你应该在之后请求价值.

这篇关于VB 脚本 - 动态数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆