ParseArgFloat.F
c
c**********************************************************************
#include "author.inc"
c* $Id: ParseArgFloat.F,v 1.9 1996/04/15 02:15:31 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_ParseArgFloat (name, value, status)
implicit none
c
c ... Input:
character*(*) name
c
c ... Output:
integer status
real 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
#ifdef cray
read(arg(ipos+1:),'(f4.1)',end=9999) value
#else
read(arg(ipos+1:),*,end=9999) value
#endif
return
endif
enddo
c
9999 continue
status = 0
return
end