Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

Intel Visual Fortran compiler does not allow an integer value for a logical variable in a namelist input file.

Daniel_R_4
Beginner
516 Views

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.)

 

0 Kudos
3 Replies
Steven_L_Intel1
Employee
516 Views

/assume:old_logical_ldio

Put this under Commandf Line > Additional Options

You know that what you're doing is bad, right?

0 Kudos
Daniel_R_4
Beginner
516 Views

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. 

0 Kudos
Steven_L_Intel1
Employee
516 Views

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.

0 Kudos
Reply