pxfgetarg

Date:

10-20-2011

NAME

PXFGETARG - Returns a command-line argument

SYNOPSIS

CHARACTER*n buf

INTEGER m, ilen, ierror

CALL PXFGETARG(m, buf, ilen, ierror)

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

The PXFGETARG subroutine examines the command line used to invoke the executing program and returns the mth command-line argument in buf.

When using the Cray Fortran compiler, all arguments must be of default kind unless documented otherwise. The default kind is KIND=4 for integer, real, complex, and logical arguments.

This routine has the following arguments:

m

An input integer variable or array element containing the number of the command-line argument to return in buf. If m is zero, the command name is returned in buf.

buf

An output character variable or array element containing the mth command-line argument.

ilen

An output integer variable containing the significant length in characters of the string stored in buf. If the length of the string is shorter than the length of buf, the shorter length is returned. If the string is longer, the longer length of the string is returned.

ierror

An output integer variable containing 0 if a value is returned in buf or containing the following:

EINVAL

If m is out of range

ETRUNC

if the declared length of buf is insufficient to contain the string to be returned. The value of the command-line argument is truncated to fit in buf, and ilen is set to the full length of the original string.

SEE ALSO

IPXFARGC(3F)