ParseArgInt.F
c**********************************************************************
#include "author.inc"
c* $Id: ParseArgInt.F,v 1.7 1995/12/21 00:57:01 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_ParseArgInt (name, value, status)
implicit none
c
c ... Input:
character*(*) name
c
c ... Output:
integer status
integer 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:),'(i10)') value
#else
read(arg(ipos+1:),*) value
#endif
return
endif
enddo
c
status = 0
return
end