      subroutine ctol(lwav)
c     --author:  c seftor
c     --date:    28-feb-91
c     --purpose: convert character string to integer
c     --and set values of logical array
      logical   lwav(12)
      integer   iwav, isza
      include "inchr.inc"
c
      if (wavnum(2:2) .eq. '-') then
         read (wavnum(1:1),'(i2)') istrt
         if (wavnum(4:4) .eq. ' ') then
            read (wavnum(3:3),'(i2)') iend
         else
            read (wavnum(3:4),'(i2)') iend
         endif
         do 550 i = istrt,iend
            lwav(i) = .true.
550      continue
      else if (wavnum(3:3).eq.'-') then
         read (wavnum(1:2),'(i2)') istrt
         read (wavnum(4:5),'(i2)') iend
         do 575 i = istrt,iend
            lwav(i) = .true.
575      continue
      else
         j = 1
         do 600 i = 2,21
            if (wavnum(i:i) .eq. ',') then
               read (wavnum(j:i-1),'(i2)') iwav
               j = i + 1
               lwav(iwav) = .true.
               if (wavnum(j:j) .eq. ' ') goto 700
            else if (wavnum(i:i) .eq. ' ') then
               read (wavnum(j:i-1),'(i2)') iwav
               lwav(iwav) = .true.
               goto 700
            endif
600      continue
700      continue
      endif
      return
      end
