
'-----
'LOOPS
'=====

  dim a,b,c,d as long, s as string


  'SIMPLE LOOPS
  '------------
  
  a=4
  '
  b=0
  do
    b+=1
    if b>a then exit do
  end do 'or enddo

  b=0
  do
    b+=1
    if b>a then exit do
  loop

  '-----------------
  'CONDITIONAL FORMS
  '=================
  
  b=0
  while b<=a
    b+=1
  end while ' or endwhile

  b=0
  while b<=a
    b+=1
  wend

  b=0
  while b<=a {b+=1}

  b=0
  do {b+=1} while b<a

  b=0
  do {b+=1} until b>=a

  b=0
  do
    b+=1
  loop while b<a

  b=0
  do
    b+=1
  loop until b>=a

  b=0
  do
    b+=1
    if b<a then continue do
    if b<a then repeat do
    if b>=a then exit do
    if b>=a then break
  loop

  b=0
  do
    b+=1
    continue while b<a   'if/when/while
    continue until b>=a
    repeat until b>=a
    redo until b>=a
    redo until not b<a
    exit when b>=a      'if/when
    exit when not b<a
    break when b>=a     'if/when
  end do


  print "ok"


 