Quantcast
Channel: Fortran
Viewing all articles
Browse latest Browse all 3108

First statement in file a continuation character

$
0
0

I need to have my subroutine INCLUDE several files that build up a statement.

Here's some code:

ASSOCIATE(
INCLUDE 'afile'
     x  VAR2 => STRUCT%VAR2)

The included file contains

     x  VAR1 => STRUCT%VAR1,

If the compiler would just include the file like a text replacement, the statement would compile, but I get the error: "First statement in file must not be continued."  That's the lowercase "x."

I really need to structure the subroutine in this way.  Is there a compiler switch to help me?

P.S.  Before you suggest a free-format file, can I tell the compiler to accept "C" in the first column as a comment line and any character in the sixth column as a continuation? I'm trying to re-use thousands of lines of code.


Viewing all articles
Browse latest Browse all 3108

Trending Articles



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