Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

PXFGETARG

POSIX Subroutine: Gets the specified command-line argument.

Module

USE IFPOSIX

CALL PXFGETARG (argnum,str,istr,ierror)

argnum

(Input) INTEGER(4). The number of the command-line argument.

str

(Output) Character. The returned string value.

istr

(Output) INTEGER(4). The length of the returned string; it is zero if an error occurs.

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code.

The PXFGETARG subroutine places the command-line argument with number argnum into character string str. If argnum is equal to zero, the value of the argument returned is the command name of the executable file.

See Also