PROGRAM select_example

  IMPLICIT NONE
  CHARACTER(len=1) :: c

  PRINT*, 'Enter a single letter'
  READ*, c

  !PRINT*, 'ichar(c) = ',ichar(c)

  SELECT CASE (c)
    CASE ('a' : 'j', 'A' : 'J')
      PRINT*, "First ten letters"
    CASE ('l' : 'p', 'u' : 'y')
      PRINT*, "One of l,m,n,o,p,u,v,w,x,y"
    CASE ('z', 'q' : 't')
      PRINT*, "One of z,q,r,s,t"
    CASE DEFAULT
      PRINT*, "Other characters"
  END SELECT

END PROGRAM select_example
