开发者

In VB for loops is less that or greater than allowed?

eg code

        For lLngIndex = 0 To lLngIndex < 256 Step 1
            lBytKeyAry(lLngIndex) = Val(pStrKey((lLngIndex Mod lLngKeyLength)))
        Next

is lLngIndex < 256 allowed?

when I debug code and go step by s开发者_StackOverflowtep it seems to always skip the for loops


The correct code for loop:

For lLngIndex = 0 To 255
    lBytKeyAry(lLngIndex) = Val(pStrKey((lLngIndex Mod lLngKeyLength)))
Next

NOTE: No need for step 1 because step 1 is the default value

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜