Intel® Fortran Compiler

Modules and subroutines

Hello everyone,

I am new to fortran.. I am facing difficulty in calling subroutine and module from main program. When I run the program , its gives error about line 95 d.


Please check any mistake in the following code:



  1. Module variables_m


Fortran calling C++ stdcall DLL

Why can I link my Intel Fortran  dll (sum_if.dll)  to my Fortran (sum_test)  but not my C++ one (sum_cpp.dll)?     All are accepted as STDCAL DLLs by other software e.g. Excel VBA (in the attached .zip)

Fortran Linking to sum_if  works with any of:

  1. Linker | Input |  Additional Dependecies= sum_if.lib
  2. Adding.lib to project (e.g. sum_if.lib)
  3. Project Dependencies = sum_if

But for sum_cpp the dll is not found or accepted   i.e.

sum_test.obj : error LNK2019: unresolved external symbol __imp_sum referenced in function _MAIN__

System and SystemQQ: what am I doing wrong?


I want to do something that is quite simple (I reckon).  I must go up one folder level, chdir to another folder and then delete one existing file in this latter folder.  What I'm doing is the following:

         Logical :: I

         I = SystemQQ('cd ..\Data\')
         I = SystemQQ('del CPG.dat')

However, it seems that not even the first command works, I mean, I cannot go up one level and then into the Data folder.  The command System (by the way, in what it differs from SystemQQ?) doesn't work either.  Same result if I split the first command:

Input data file with columns divided in blocks

Hello all,

I need to read a 62x14 table which is generated by an external program. However the external program splits the table in two parts, showing the first 10 columns and the remaining columns just below the first part. Is it possible to read such table in my Fortran code? What should be done?





C calling Fortran where an argument is a derived type

I have a Fortran subroutine which I want to call from C.  One of the arguments is a derived type such as:

type :: pprop
  real*8 :: x1
  real*8 :: x2
  real*8 :: x3
  real*8 :: x4
end type pprop

On the C side, what can I map this to?  Will an array work as all the components are of the same type?  Or do I have to map to a struct?

What VS displays when I hover over or click on a variable name

When I click on a variable name, the name is conveniently highlighted. I like this very much and have come to depend on it. But it doesn't always do this. It seems stop suddenly and randomly; for example when I change from one source file to another, or after a debug run. Sometimes it works on some tokens but not others; other times it works on all of them even in the same file. Sometimes I can close VS, fire it up again, and it will be working. But not always.

Feature request: Compiler Version Notes

ifort currently generates comment sections in compiler-generated assembler files (built with "-s") that contain a lot of useful information, such as the compiler version and flags used when compiling; however, since these are comments, they do not find their way into the compiled object files.  Would it be possible to have the compiler mimic gcc's behavior and put this information instead in a ".note" section?  GCC uses ".note.GNU-stack" and places just the compiler version, which alone would be nice, but if there are no restrictions on data length, the compile flags would be nice too.  Or

Cycling block-do-construct with inner block-construct

Hi, I'm wondering if there exists a way (other than branching) for exiting or cycling within a inner block in a do block:

do i=1,10
        integer :: k
        if (...) then
            cycle !not possible
        end if
    end block
end do

More general, the question is, if its possible to terminate the execution of a block-construct without using IF/GOTO? I've looked into the standard but I've found no other possibilities...

订阅 Intel® Fortran Compiler