作者:Annie千寻_535 | 来源:互联网 | 2023-05-19 01:42
I have some code along the lines of the following:
我有一些代码如下:
redim a(1 to N)
for i = 1 to N
a(i) = someFunction(i)
Next i
When running it, I get "Run-time error 6: Overflow"
. And it enters break mode with the line inside the loop: a(i) = someFunction(i)
highlighted. To find the error, I step into that function and step over line-by-line. There's no error, it works fine and keeps going. As long as I execute the code this way, staying in break mode & stepping in to someFunction
one call at a time, it works, but as soon as I go back to normal execution, the overflow error comes back.
运行时,我得到“运行时错误6:溢出”。并且它与循环内的行进入break模式:a(i)= someFunction(i)突出显示。为了找到错误,我逐步进入该功能并逐步执行。没有错误,它工作正常,并继续前进。只要我以这种方式执行代码,保持中断模式并一次进入someFunction一个调用,它就可以工作,但是一旦我恢复正常执行,溢出错误就会恢复。
Does anyone know how can I get rid of the overflow?
有谁知道我怎么能摆脱溢出?
2 个解决方案