GetCurrentDir subroutine

Returns the current directory (the directory from which the application is running).

GetCurrentDir(null,CurrentDirectory)

The GetCurrentDir subroutine has the following parameter.

ParameterDescription
nullPass a null value to the first parameter
CurrentDirectoryVariable which must be initialized. After the call, CurrentDirectory will contain the current directory name.

Note: In versions 9.1 and above, it is not necessary to pass a null variable as the first parameter. The only parameter necessary is the current directory.

In 9.1 and above:

GetCurrentDir("", CurrentDirectory) and GetCurrentDir(CurrentDirectory) will return the current directory.

In 9.0. and prior:

GetCurrentDir("", CurrentDirectory) will return the current directory. GetCurrentDir(CurrentDirectory) will return the current directory in most situations but not all.

/* after GetCurrentDir() is called, currdir will contain the current directory name.  */

 

declare subroutine GetCurrentDir

currdir = ''

call GetCurrentDir('',currdir)
 
 
  • guides/programming/programmers_reference_manual/getcurrentdir.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1