I have been going through another person's (who is currently not accesable for me) code of Fortran 77 and am relatively new to Fortran.
He uses a keyword 'INCLUDE' whilst declaring variables, like include something.inc.
What does it indicate?
Welcome to our forums
I have been going through another person's (who is currently not accesable for me) code of Fortran 77 and am relatively new to Fortran.
He uses a keyword 'INCLUDE' whilst declaring variables, like include something.inc.
What does it indicate?
It describes another file that is to be inserted into the code at that point.
... and there's another bit of valuable knowledge. In FTN95, enclosing the filename in 'diamond brackets' means 'go and look for it in FTN95's folders', e.g
INCLUDE <WINDOWS.INS>
(although this is non-standard), whereas if the filename is treated as a literal, e.g.
INCLUDE 'C:\\PROGRAM\\something.inc'
then that tells the compiler where to look (or if a path isn't given, look in the working folder).
The relevant bit in FTN95's help file describes INCLUDE as a 'compiler directive', and notes that it can occur anywhere in source code, including in an INCLUDE file, nesting up to 10 deep.
Eddie