Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29262 ディスカッション

File extension for free form, included code files?

OP1
新規コントリビューター III
1,021件の閲覧回数

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 件の賞賛
5 返答(返信)
andrew_4619
名誉コントリビューター III
1,021件の閲覧回数

<file>.fd should work I think

OP1
新規コントリビューター III
1,021件の閲覧回数

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

OP1
新規コントリビューター III
1,021件の閲覧回数

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

Steven_L_Intel1
従業員
1,021件の閲覧回数

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

andrew_4619
名誉コントリビューター III
1,021件の閲覧回数

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.

 

 

 

 

返信