![]() |
Forum Index : Microcontroller and PC projects : Multi line ELSE IF
![]() ![]() |
|||||
Author | Message | ||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2522 |
could be |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1127 |
EXIT is a quick way out of DO and FOR loops. For i = 1 To SomeNumber Do Stuff If somthing is TRUE Then Exit For Do Other Stuff Next i "Next" with a variable is slower than without. Visit Vegipete's *Mite Library for cool programs. |
||||
scruss Regular Member ![]() Joined: 20/09/2021 Location: CanadaPosts: 90 |
While you can change the value of a counter variable, it's not the most obvious way of exiting the loop. EXIT FOR, however, is explicit. ANSI/ECMA Standard BASIC doesn't allow you to change a loop variable. Not that many people ever paid much attention to that standard. |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |