Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

read namelist from string broken?

$
0
0

I use Intel(R) Visual Fortran Composer XE 2011 Update 6 Integration for Microsoft Visual Studio* 2010, 12.1.3514.2010 and face a strange compiler/linker problem. The program below tries to parse an argument list from a string using a namelist but fails at linking with an unresolved symbol "_for_read_int_nml".

program namelisttest
        character(len=255) :: buffer, str1, str2
        namelist /arglist/ str1, str2
        buffer = "&arglist str2='test string' /"        read(buffer,nml=arglist)
        write(*,arglist)
end program

I tested this under linux (ifort and gfortran) without any problems. Is this a bug in the compiler, since it searches for _for_read_int_nml (instead of _for_read_seq_nml) ?

Is there a workaround (except writing a temporary file) or a better way for parsing a string into several fields?

Thanks in advance


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>