- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know this was discussed before, but I still can't make it work consistently.
Here is a test case illustrating the problem.
Interestingly enough, the use of GETFULLPATH does return the current working
directory, which includes the file name. But GETCWD does not return anything.
Generally the first call should return the current
working directory where execution is started from (?)
Here is a test case illustrating the problem.
Interestingly enough, the use of GETFULLPATH does return the current working
directory, which includes the file name. But GETCWD does not return anything.
[bash] PROGRAM TEST_GETCWDWhy would I get a status of 34 on the first call?
use ifport
implicit NONE
character*80 cwd,cwd2
integer(4) istat,istat3
logical(4) istat2
istat=getcwd(cwd)
print *,"istat=",istat
print *,"cwd=",cwd
istat2=changedirqq("C:\")
print *,"istat2=",istat2
istat3=getcwd(cwd2)
print *,"istat3=",istat3
print *,"cwd2=",cwd2
pause "exiting"
end program
[/bash]
Generally the first call should return the current
working directory where execution is started from (?)
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't get a status of 34, but if the default path is longer than 80 characters, you might get an error.
Don't you mean to use cwd2 in line 12?
Don't you mean to use cwd2 in line 12?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're right, I did mean to use that. When I fix it, I do get the correct answer.
As far as the first call, I will lengthen the CHARACTER variable, see what happens.
Where would I find out what that error #34 actually means?
Is that the same as the I/O errors from OPEN, CLOSE, READ, etc?
Thanks; Bill S.
As far as the first call, I will lengthen the CHARACTER variable, see what happens.
Where would I find out what that error #34 actually means?
Is that the same as the I/O errors from OPEN, CLOSE, READ, etc?
Thanks; Bill S.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very helpful, thanks -
I never would have found that on my own.....
I never would have found that on my own.....

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page