'--------------------------------------------------------------
'                     (c) 2000-2003 MCS Electronics
'--------------------------------------------------------------
'  file: FOR_NEXT.BAS
'  demo: FOR, NEXT
'--------------------------------------------------------------
Dim A As Byte , B1 As Byte , C As Integer


For A = 1 To 10 Step 2
   Print "This is A " ; A
Next A

Print "Now lets count down"
For C = 10 To -5 Step -1
  Print "This is C " ; C
Next



Print "You can also nest FOR..NEXT statements."
For A = 1 To 10
  Print "This is A " ; A
  For B1 = 1 To 10
    Print "This is B1 " ; B1
  Next                                  ' note that you do not have to specify the parameter
Next A



End