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

File extension for free form, included code files?

OP1
New Contributor III
999 Views

My code uses extensively #INCLUDE statements for bits and pieces of code. Right now these bits and pieces are files with the extension *.f90. This allows Visual Studio (2013) to correctly perform the syntactic highlighting of these included files. I would like however to assign to these included files a different extension (to distinguish them from the 'parents' files, which are properly formed source files), while retaining the syntactic highlighting capability.

Is there a way to do this in Visual Studio 2013?
 

0 Kudos
5 Replies
andrew_4619
Honored Contributor III
999 Views

<file>.fd should work I think

0 Kudos
OP1
New Contributor III
999 Views

No, this does not work as *.fd/*.fi extensions are for fixed-format code.

0 Kudos
OP1
New Contributor III
999 Views

This does the trick - I had to restart VS 2013 a couple times to make it work though, weird.

https://software.intel.com/en-us/node/510103

0 Kudos
Steven_L_Intel1
Employee
999 Views

See also https://software.intel.com/en-us/articles/problem-fortran-source-files-not-compiled-when-building-in-visual-studio#add

0 Kudos
andrew_4619
Honored Contributor III
999 Views

opmkl wrote:

No, this does not work as *.fd/*.fi extensions are for fixed-format code.

Yes you are indeed correct. Rather than inventing a new file type why not just a a prefix or postfix for include file names. e.g inc_name.f90 or name_inc.f90 then your files will clearly indicate they are includes.

 

 

 

 

0 Kudos
Reply