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

Intel Fortran integration with Visual Studio: improved syntax highlighting?

FortranFan
Honored Contributor II
963 Views

I just noticed VALUE attribute and MOVE_ALLOC intrinsic procedure do not get highlighted in Visual Studio file editor; I presume there are also other such items that are not getting highlighted?

So is it possible for Intel Fortran integration with Visual Studio to be improved to allow syntax highlighting for the full list of keywords, etc. in the current Fortran standard?

Periodically a paper is published in ACM Fortran Forum (Gorelik is usually the author) listing the "Statements, data types and intrinsic procedures in the Fortran standards."  It may be a good starting point for the Intel Fortran team team to check.

By the way, for forum posts involving code snippets, how does the highlighting work?  Is that dependent on one's individual browser or something on the Intel server side?  In the code snippets too, one can notice certain Fortran standard keywords not getting highlighted.

0 Kudos
7 Replies
andrew_4619
Honored Contributor II
963 Views

As you intimate I have noticed there are quite a number of keywords that do not highlight. 

0 Kudos
Simon_Geard
New Contributor I
963 Views

Keywords also get highlighted when contextually they shouldn't be, for example when one is used as a variable name.

0 Kudos
FortranFan
Honored Contributor II
963 Views

sgeard@cad-schroer.co.uk wrote:

Keywords also get highlighted when contextually they shouldn't be, for example when one is used as a variable name.

I personally would prefer if keywords always get highlighted; I never want to use keywords as variable names or give the procedures the same name as intrinsic ones.

0 Kudos
Simon_Geard
New Contributor I
963 Views

In an ideal world I'd agree with you, but I'm usually working on code that started life 25 years ago before many of these keywords were created and so find it annoying when variables like 'in' and 'result' get highlighted.

[fortran]

        integer :: in, result, value, index

[/fortran]

The above highlighting is different from the same declaration in Visual Studio.

0 Kudos
andrew_4619
Honored Contributor II
963 Views

Actually the highlighting in #5 whilst I agree it might irritate it does at least warn the uninitiated that they are moving to the dark side of the force, i.e. misappropriating language keywords.......

 

0 Kudos
Steven_L_Intel1
Employee
963 Views

I will let the VS integration developers know that they need to update their list.

This forum uses an open source code highlighter tool which is not very good about Fortran. I'll see what I can do to get the keyword list improved, at least.

0 Kudos
K__Li
Beginner
963 Views

My free text editor can highlight .true. and .false. much better than Intel. 

0 Kudos
Reply