      subroutine univparser(longchar,nmax,vars,n)
!convert a line of characters that consists of an array of real numbers into a
!vector of real numbers
      implicit none
      integer nmax,n
      double precision vars(nmax+100)
      character(*)::longchar
      character astring*50,c*1
      integer i,pos1,pos2,ispartnum,leng,numchar,ierr
!
      n=0
      leng=len(longchar)
      i=0
10    i=i+1
      if(i.gt.leng)return
      c=longchar(i:i)
      if(ispartnum(c).eq.0)goto 10
      pos1=i-1
20    i=i+1
      c=longchar(i:i)
      if(ispartnum(c).eq.1)then
        if(i.lt.leng)goto 20
        i=i+1
      endif
      numchar=i-1-(pos1+1)+1
      if(numchar.gt.0)then
        n=n+1
        astring=longchar((pos1+1):(i-1))
        call extCharToFloatNum(numchar,astring,vars(n),ierr)
      endif
      if(i.ge.leng)return
      pos1=i
      goto 20
      return
      end subroutine univparser
