ParseArgChar.F
c
c**********************************************************************
#include "author.inc"
c* $Id: ParseArgChar.F,v 1.8 1996/01/31 20:03:12 turner Exp $
c*
c* Subroutine to read a real value from a command line argument
c* of the form:
c*
c* name=value
c*
c* <PARAMETER LIST>
c*
c* Input:
c* name - character string used on command line
c*
c* Output
c* value - value of the variable
c* status - return status
c*
#include "copyright.inc"
c**********************************************************************
subroutine JT_ParseArgChar (name, value, status)
implicit none
c
c ... Input:
character*(*) name
c
c ... Output:
integer status
character*(*) value
c
c ... Local:
character*(40) arg
integer i, ipos
#if defined(cray) && !defined(unicos7)
integer IPXFARGC, ilen, ierror
c
do i=1,IPXFARGC()
call PXFGETARG (i, arg, ilen, ierror)
#else
integer IARGC
c
do i=1,IARGC()
call GETARG (i, arg)
#endif
ipos = INDEX(arg, '=')
if (arg(1:ipos-1) .eq. name) then
#if defined(aix) || defined(osf1)
read(arg(ipos+1:),*) value
#else
read(arg(ipos+1:),'(a)') value
#endif
return
endif
enddo
c
status = 0
return
end