Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

%val type mismatch

scrognoid
初学者
535 次查看
I have an array of addresses and I need to assign values to the variable at those address. In my previous compiler, I was able to pass the address using %val, and receive the address as a plain ol' variable of the correct type. FORTRAN passes by reference, so passing a reference by value gave me access to the variable. Intel FORTRAN complains of a type mismatch, insisting that %val yields an integer. I am passing a real address as an actual argument to a real variable dummy argument. How can I do this with Intel FORTRAN?

(I tried searching this forum, but search engines don't return results for "%")
0 项奖励
1 解答
Steven_L_Intel1
535 次查看
You can still do it that way, but you're running into the enhanced interface checking that Intel Fortran has. The easiest thing would be to disable the diagnostics for interfaces and disable generated interfaces.

There are ways to do this with the C interoperability features of F2003 but it's more work than I think is warranted here.

在原帖中查看解决方案

0 项奖励
1 回复
Steven_L_Intel1
536 次查看
You can still do it that way, but you're running into the enhanced interface checking that Intel Fortran has. The easiest thing would be to disable the diagnostics for interfaces and disable generated interfaces.

There are ways to do this with the C interoperability features of F2003 but it's more work than I think is warranted here.
0 项奖励
回复