GETCWD

Portability Function: Retrieves the path of the current working directory.

Module: USE DFPORT

Syntax

result = GETCWD (dirname)

dirname
(Output) Character *(*). Name of the current working directory path, including drive letter.

Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, an error code.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: GETDRIVEDIRQQ

Example

    character*30 dirname
!   variable dirname must be long enough to hold entire string
    integer(4) istat
    ISTAT = GETCWD (dirname)
    IF (ISTAT == 0) write *, 'Current directory is ',dirname