Next: , Previous: GET_COMMAND_ARGUMENT, Up: Intrinsic Procedures


6.88 GETCWD — Get current working directory

Description:
Get current working directory.

This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.

Standard:
GNU extension
Class:
Subroutine, function
Syntax:
CALL GETCWD(CWD [, STATUS])
Arguments:

CWD The type shall be CHARACTER(*).
STATUS (Optional) status flag. Returns 0 on success, a system specific and nonzero error code otherwise.

Example:
          PROGRAM test_getcwd
            CHARACTER(len=255) :: cwd
            CALL getcwd(cwd)
            WRITE(*,*) TRIM(cwd)
          END PROGRAM
     

See also:
CHDIR