- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm calling the "Print_Unit" routine in fortran_Winprint.f90.
I have opened file 99 with open (99,FILE='c:grade est eport.log')
In "Print_Unit" on line - read (unit,'(Q,A)',end=80000) line_len, line
I get he error file not found 'c:grade estfort.99'
It works OK on most computers (including mine) but not on one or two others.
Somewhere unit 99 must be getting currupted.
How can I debug it to find out when unit 99 is changed.
How can I print out the value of unit 99?
Thanks,
David
I have opened file 99 with open (99,FILE='c:grade est eport.log')
In "Print_Unit" on line - read (unit,'(Q,A)',end=80000) line_len, line
I get he error file not found 'c:grade estfort.99'
It works OK on most computers (including mine) but not on one or two others.
Somewhere unit 99 must be getting currupted.
How can I debug it to find out when unit 99 is changed.
How can I print out the value of unit 99?
Thanks,
David
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use:
CHARACTER(255) filename
...
INQUIRE (UNIT=99,NAME=filename)
PRINT *, trim(filename)
Does the OPEN statement really look the way you show it or are you using a variable to construct the filename? It seems as if the path was there nut not the 'report.log' part.
CHARACTER(255) filename
...
INQUIRE (UNIT=99,NAME=filename)
PRINT *, trim(filename)
Does the OPEN statement really look the way you show it or are you using a variable to construct the filename? It seems as if the path was there nut not the 'report.log' part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help. I can now track the problem a bit more. The PrintDlg routine is causing the filename to be lost.
When I print debug.txt I get the following
1C:GradedataTest eport.log
2
Any ideas what could be causing the problem? It is OK on some computers but not on others.
David
open (98,FILE="c: empdebug.txt")
INQUIRE (UNIT=unit,NAME=filename)
write (98,'(2A)') "1",trim(filename)
Last_Error = PrintDlg (PRINTDLG_Struct)
INQUIRE (UNIT=unit,NAME=filename)
write (98,'(2A)') "2",trim(filename)
When I print debug.txt I get the following
1C:GradedataTest eport.log
2
Any ideas what could be causing the problem? It is OK on some computers but not on others.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide a short but complete program that shows the problem? (No need to include the module source.unless you have edited it.)

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