- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The subroutine I am uploading has an anomaly I can't explain.
Around line 61 there is a PRINT statement for the array QU(0:NQU)
It does not print the array, just the opening character string.
I checked with the debugger, and the value NQU is just as it should be, a positive number.
furthermore the other arrays DO print out as desired -
using the same Format statement.
So I am wondering - what is special about that array that would trigger this problem?
BTW, I have a special reason for dimensioning the arrays the way I do,
starting with 0 as the first element, but I am wondering if that "fools" the compiler.
I tried taking the array QU out of the calling sequence, but that had NO effect.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can put everything into a special project if you need to RUN it.
How do I upload a whole project at once?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ZIP the project folder and attach that.
- 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
Your ZIP doesn't include the sources, and you didn't attach all of them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I zipped the entire folder with all the sources in it, and when I moved into another computer, all the sources were there.
so I don't see why you say that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only Fortran source files in your zip archive are the *genmod.f90 files generated by the compiler. There is not a single original source file in the zip from which those interface checking files could be generated.
List the names of your original Fortran source files, and we can check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, here it is again -
I think some of the files were attached to a project in another folder.\
This one should have 7 source files in it.
You can see where I printed the number NQU, but the array QU does not print.
Thats around line 53 of the routine IDIV.
QU(0:NQU) should print out NQU+1
quantities, right?
I also tried ( QU(KK),kk=0,NQU )
but got the same result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You've got two character edit descriptors (i.e. two letter A's ) in the format specification (labelled 102), but you don't have two character things in the item list in the print statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I see where I forgot to put the BLANKS in -
But why didn't it flag an error when I tried to print an integer
with an A descriptor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because we allow that to work by default - some people used such a feature. There is an optional check for format mismatch you can turn on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mismatch isn't detected with /warn:all /check:all /stand. is something else required?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The option /check:format appears to catch some mismatches between format descriptors and I/O list elements.
[fortran]program tfmt
integer :: i = 90 ! 'Z'
character(len=1) :: cz = 'Z'
!
write(*,'(1x,A5)')i !no error
write(*,'(1x,I8)')cz !flagged
!
end program tfmt[/fortran]
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page