      subroutine libas(o,aa,ii,nb)
      character(*) o,aa
      character(80) form
      ll=len_trim(aa)
      nb=0
      jj=index(aa,o)
      if(jj==0) return
      write(form,'(a2,i1,a1)') '(I',jj-2,')'
      read(aa(2:jj-1),form) nb
      ii=ii+jj-1
      return
      end
