Hi everyone,
I have a program written in Fortran 90/95; after invocation it always reads a certain data file. For the users' convenience I'd like them to just have to place this file in the same directory as the executable itself, without making them set some environment variable/extend $PATH, and without forcing them to use a certain directory for that purpose. The program should 'simply' look for the file in the directory in which it itself is stored, NOT in the directory from which it is run. So far, however, I have failed to find a solution to this problem. I tried using
getarg(0,path)
but that only gave me whatever string I had used to invoke the program, not its absolute path.
If you have any suggestions, also concerning workarounds, please don't hesitate to reply. Thanks a lot in advance!