'-------------------------------------------------------------- ' (c) 1997,1998 MCS Electronics '-------------------------------------------------------------- ' file: EXIT.BAS ' demo: EXIT '-------------------------------------------------------------- Dim B1 As Byte , A As Byte B1 = 50 'assign var For A = 1 To 100 'for next loop If A = B1 Then 'decision Exit For 'exit loop End If Next Print "Exited the FOR..NEXT when A was " ; A A = 1 Do Inc A If A = 10 Then Exit Do End If Loop Print "Loop terminated" End