

'------
'SELECT
'======

  dim a as long, s as string
  
  a=3

  'COMPACT FORM
  '------------
  
  select a 'select case a
      
  case 1 : s="A=1"
  case 2 : s="A=2"
  case 3 : s="A=3"
  case else : s="A>3"
      
  end select


  'GENERAL FORM
  '------------
  
  select a
      
  case 1
    s="A=1"
  case 2
    s="A=2"
  case 3
    s="A=3"
  case else
    s="A>3"
      
  end select


'------------------
'SYNTAX VARIATIONS
'=================

  select a {
      
  case 1
    s="A=1"
  case 2
    s="A=2"
  case 3
    s="A=3"
  case else
    s="A>3"
      
  }

  switch a {
      
  case 1
    s="A=1"
    break
  case 2
    s="A=2"
    break
  case 3
    s="A=3"
    break
  case else
    s="A>3"
    break
      
  }


  '----------
  'EXTENSIONS
  '==========

  select a
      
  case 1
    s="A=1"
  case 2
    s="A=2"
  case 3
    s="A=3"
  case 4,5,6
    '
  case 7 to 9
    '
  case 10 to <20
    '
  case else
    s="A>3"
      
  end select





  

  print s
