N ncc1701mda Member Licensed User Longtime User Jan 24, 2012 #1 I can't find any related posts here ... apologies if I've missed them... I tried to create a for next loop inside a select end select block and it will not compile - here is some simple code that shows this: Sub TestIt Dim X2 As Int Dim Y As Int Y = 1 Select Y Case 1 For X2 = 0 To 5 Next X2 Case 2 End Select End Sub Am I doing somthing wrong here or??? Mike
I can't find any related posts here ... apologies if I've missed them... I tried to create a for next loop inside a select end select block and it will not compile - here is some simple code that shows this: Sub TestIt Dim X2 As Int Dim Y As Int Y = 1 Select Y Case 1 For X2 = 0 To 5 Next X2 Case 2 End Select End Sub Am I doing somthing wrong here or??? Mike
Ricky D Well-Known Member Licensed User Longtime User Jan 24, 2012 #2 try this B4X: Sub TestIt Dim X2 As Int Dim Y As Int Y = 1 Select Y Case 1 For X2 = 0 To 5 Next Case 2 End Select End Sub The next statement doesn't need the loop variable. This is what's causing the compiler to complain. Hope this helps regards, Ricky Upvote 0
try this B4X: Sub TestIt Dim X2 As Int Dim Y As Int Y = 1 Select Y Case 1 For X2 = 0 To 5 Next Case 2 End Select End Sub The next statement doesn't need the loop variable. This is what's causing the compiler to complain. Hope this helps regards, Ricky
N ncc1701mda Member Licensed User Longtime User Jan 24, 2012 #3 :sign0161: Too much old VB on the brain... Thanks! Figured it was something stupid that I did! Mike Upvote 0
Ricky D Well-Known Member Licensed User Longtime User Jan 24, 2012 #4 not stupid! :sign0105: you're not stupid. Too simple a thing for our complex brains I say! I do understand this because I hit hit it too. cheers, Ricky Upvote 0
not stupid! :sign0105: you're not stupid. Too simple a thing for our complex brains I say! I do understand this because I hit hit it too. cheers, Ricky