- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sure this is just a compiler setting or something, but I'm rusty! When we moved from 2013 to 2015, our applications stopped working properly. We tracked it down to the fact that we were trying to read integers (or a delimited integer - e.g. '1') into a real. In 2013 this worked. In 2015 it's blowing up on us. Any ideas?
Thanks!
Brad.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In general, newer versions of the compiler do a better job of catching errors in Fortran programs, and it is best to use the new diagnostics to fix the bugs in the program. Similarly, the behavior of programs with errors is often not "defined", and this behavior may change from compiler to compiler, and any specific behavior should not be depended upon.
I do not have at hand the versions that you mentioned, but here is a small program that attempts reading an incorrect list-directed input record. The Intel 7.0 compiler does not catch the error, but the 16.0 compiler does, as do the Gfortran and NAG compilers.
program tst character(len=11) :: line = '''1'',1.5,2.5' real ::x,y,z read(line,*)x,y,z write(*,10)x,y,z 10 format(3F12.4) end program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is an option that controls this behavior - /check:format (in Visual Studio, Run-time > Check Edit Descriptor Data Type)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page