Denial
Structural
- Jun 3, 2003
- 924
As my recent posts on this forum attest, I am trying to get an old Fortran program to run on a modern Windows computer.[ ] Progress is slow but steady.
However I have struck an "interesting" little problem.[ ] My program's *.EXE file will reside in a directory that will be chosen by the end user, with different users choosing to store it in different places.[ ] Users will run the program from a "Command Prompt" window, by typing its name and its residence directory.[ ] Thus they might type:
»[ ] ProgName[ ][ ] (if the program resides in the current working directory or in a directory that is on the system's "path")
»[ ] D:\MySoftware\etc\etc\ProgName[ ][ ] (an absolute address for the residence directory)
»[ ] ..\ProgName[ ][ ] (if the program resides in the directory above the current working directory)
I am looking for a way for the program to find out the full name of its residence directory.[ ] Gfortran has a subroutine GETCWD(cwd) that returns the full name of the directory the user is "sitting in", but I have been unable to find a way to obtain the program's residence directory.
Does anyone know of a way to achieve this?
However I have struck an "interesting" little problem.[ ] My program's *.EXE file will reside in a directory that will be chosen by the end user, with different users choosing to store it in different places.[ ] Users will run the program from a "Command Prompt" window, by typing its name and its residence directory.[ ] Thus they might type:
»[ ] ProgName[ ][ ] (if the program resides in the current working directory or in a directory that is on the system's "path")
»[ ] D:\MySoftware\etc\etc\ProgName[ ][ ] (an absolute address for the residence directory)
»[ ] ..\ProgName[ ][ ] (if the program resides in the directory above the current working directory)
I am looking for a way for the program to find out the full name of its residence directory.[ ] Gfortran has a subroutine GETCWD(cwd) that returns the full name of the directory the user is "sitting in", but I have been unable to find a way to obtain the program's residence directory.
Does anyone know of a way to achieve this?