INCLUDE file

From: Luca Pignagnoli (lucapignaonline_at_libero.it)
Date: 02/26/04


Date: 26 Feb 2004 05:25:54 -0800

I am an italian researcher on mathematical model of water waves-ice
interaction.
I need to perform a numerical simulation with Fortran 77, but I am an
"absolute beginner" with this language.

My question is how to split a very big Fortran code into subprogram
and to call them by the main program.

In order to solve this problem I have tried to compile and run the
following very simple code:

MAIN PROGRAM:

      program A
      implicit none
      
      include "B.f"
      
      call HELLO()
      
      stop
      end

FILE B.f:

      subroutine HELLO ()

      write (*,*) 'HELLO WORLD !!!'

      return

      end

The compiler send me the following error message:

B.f : missing END statement inserted prior to statement.

How can I solve the problem ?

Bye,
Luca



Relevant Pages

  • fortran with real-time workshop
    ... S-Function that is written in Fortran code. ... compile as is, but by removing that part of the model it compiles. ...
    (comp.soft-sys.matlab)
  • Re: INCLUDE file
    ... >My question is how to split a very big Fortran code into subprogram ... >In order to solve this problem I have tried to compile and run the ... missing END statement inserted prior to statement. ...
    (comp.lang.fortran)
  • Re: how to call C (non-intel C compiler) from ifort (intel fortran)?
    ... | I need to call C within fortran code. ... I could compile and link using ... (For using ifort with icc, ...
    (comp.lang.fortran)
  • Re: how do gfortran and ifort deal with C head files?
    ... by fortran sources. ... I can compile the package using g95, ... Fortran code rather than C or they aren't going to do anything useful in ... It is just asking for portability problems. ...
    (comp.lang.fortran)
  • Re: reading more data than the record size (RECL)
    ... end snip ... This overhead is there to allow Fortran ... compile the original source code with g95, ... Think of it as a variant on the ASCII vrs ...
    (comp.lang.fortran)