gpt4 book ai didi

arrays - 在经典 Asp VBScript 中迭代数组的最佳方法是什么?

转载 作者:行者123 更新时间:2023-12-03 07:38:06 25 4
gpt4 key购买 nike

在下面的代码中

For i = LBound(arr) To UBound(arr)

使用LBound询问有什么意义?当然,这始终是 0。

最佳答案

为什么不使用For Each?这样您就不需要关心 LBoundUBound 是什么。

Dim x, y, z
x = Array(1, 2, 3)

For Each y In x
z = DoSomethingWith(y)
Next

关于arrays - 在经典 Asp VBScript 中迭代数组的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2348/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com