为什么我在vb.net中运行以下函数时会出现以下错误?
file.vb在线?没有错误,但编译失败了?
vbnc:命令行:错误VBNC99999:意外错误:有 是编译器中的内部错误:一致性检查失败 vbnc.Compiler.VerifyConsistency(布尔结果,跨度位置) [0x00000] in:0 at vbnc.AssemblyDeclaration.ResolveCode(vbnc.ResolveInfo Info)[0x00000] in:0 at vbnc.Compiler.Compile_Resolve() [0x00000] in:0 at vbnc.Compiler.Compile() [0x00000] in:0编译时间为00:00:00.8679190
Function launchSequenceChecker(systemNames As List(Of String), stepNumbers As List(Of Integer)) As Boolean
dim a,b,c as integer
dim len1 as integer
dim len2 as integer
Dim answer As Boolean
len1 = systemNames().count
len2 = stepNumbers().count
for c =0 to len1-1
dim systemNames(c) as string
dim stepNumbers(c) as integer
next c
for a = 0 to len1-1
for b = a to len2
if string.compareordinal(systemNames(a),systemNames(b+1)) = true then
if stepNumbers(a) < stepNumbers(b+1) then
return false
end if
end if
next b
next a
返回true
结束功能
答案 0 :(得分:0)
您的For
循环指定a
和b
作为循环计数器,但您的Next语句指定b
和c
。我猜这就是问题所在。我可以看到代码中的其他问题,但是我认为这解决了您的具体问题。