This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.
CALL GETCWD(C [, STATUS]) |
STATUS = GETCWD(C) |
C | The type shall be CHARACTER and of default kind. |
STATUS | (Optional) status flag. Returns 0 on success, a system specific and nonzero error code otherwise. |
PROGRAM test_getcwd CHARACTER(len=255) :: cwd CALL getcwd(cwd) WRITE(*,*) TRIM(cwd) END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gfortran/GETCWD.html