Routines for Information Retrieval

Routines classified as information retrieval routines return information about system commands, command-line arguments, environment variables, and process or user information.

All portability routines that take path names also accept long file names or UNC (Universal Naming Convention) file names. A forward slash in a path name is treated as a backslash. All path names can contain drive specifications as well as MBCS (multiple-byte character set) characters. For information on MBCS characters, see Using National Language Support Routines.

Portability Routine Description
IARGC Returns the index of the last command-line argument
GETENV Searches the environment for a given string, and returns its value if found
GETGID Returns the group ID of the user
GETLOG Get user's login name
GETPID Returns the process ID of the process
GETUID Returns the user ID of the user of the process
HOSTNAM Returns the name of the user's host

Group, user, and process ID are INTEGER(4) variables. Login name and host name are character variables. The functions GETGID and GETUID are provided for portability, but always return 1.

IARGC is best used with GETARG. GETARG, which returns command line arguments, is available in the standard Visual Fortran library; you do not have to specify USE DFPORT in your program unit.

For more information: