- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Background/Problem: I am porting code from Compaq Visual Fortran to Intel Visual Fortran. When I try to read a namelist file that contains integer values (1 or 0) assigned to logical variables, I get a run-time error message (iostat=17; syntax error in NAMELIST file). When I change the input file to assign logical values (t or f) to the logical variables, the file is read without errors.
I am using Intel(R) Visual Fortran Composer XE 2011 Update 9 Integration for Microsoft Visual Studio* 2010, 12.1.3526.2010.
Question: Is there a setting for the Intel Visual Fortran compiler that will produce the Compaq Visual Fortran behavior? (I have a huge number of input files that will have to be changed, otherwise.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/assume:old_logical_ldio
Put this under Commandf Line > Additional Options
You know that what you're doing is bad, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your quick response to my question. Yes, I know that I am not following standard practice when coding. I have a task with limited budget and the only thing I can do today is to document the changes I have done and to describe what needs to be done in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understood. This is why we provide the option to get the old, looser behavior. We received many complaints over the years that this free conversion between logical and numeric was accepted in list-directed and NAMELIST I/O so we tightened it up and added the option. The extension has a history dating back to the 1970s, and once made sense in assignments and expressions, but never really did in I/O.

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