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

Exclamation marks as a comment - blue/white bar

stedwomas
Beginner
1,951 Views

I am debugging a piece of code and I commented out some lines BUT some parts of the code have a blue /white  bar down the left hand side of the code . I save the subroutine and it compiles and builds ok , but the program  ignores the ( blue/white)  commented-out lines and in debug just ignores them and carries out the function of that line as if the exclamation is not there 

 

Any  explanation 

 

steve

0 Kudos
13 Replies
Steve_Lionel
Honored Contributor III
1,943 Views

I have never seen that particular indication before. I am confused by your description - do the commented-out lines execute or not?

I can see a green bar indicating a "Saved Change" in the editor and debugger. What do you see if you position the mouse on one of those bars (don't click) and wait for a tooltip to pop up?

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,935 Views

What I find odd are three things:

1) you have a mixture of Fixed-Format comment (C in column 1) and Free-Format (! anywhere on line), yet the compiler did not complain.

2) The blue (striped) lines appears on only one set of commented out lines. Was there anything different as to how the comments were made.

3) The vertical blue line seems to be indented further to the right of the grey border than where the green and yellow vertical bar appears.

 

Would you happen to have non-printing characters on those lines?

 

Jim Dempsey

0 Kudos
JohnNichols
Valued Contributor III
1,921 Views

Screenshot_20221121_034730.png

You cannot mix C and ! in the same file, you get this error.  

Screenshot_20221121_034847.png

When you add lines you get the yellow box down the left hand side. 

 

Not sure about the blue, but it does not matter to you use a consistent commenting style. 

0 Kudos
Steve_Lionel
Honored Contributor III
1,909 Views

There's no problem in ifort using ! as a comment introducer in fixed-form source. I do this all the time (in working with code from others - I never write fixed-form myself.)

The errors reported in @JohnNichols ' compile aren't related to comment introducers.  What I see is the lack of an include file, errors because types haven't been declared. I can't see what caused the syntax error, as this is an excerpt.

 

D:\Projects>type t.for
      program main
      print *, "Hello World"
!C Test
      print *, "Bye World"
      end
D:\Projects>ifort -c t.for
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.7.1 Build 20221019_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.


D:\Projects>

 

0 Kudos
JohnNichols
Valued Contributor III
1,881 Views

I was testing F90 - there is no file type on the original source shown.  I did not test fixed format, long time since I used it and when I strike it I prefer to change to free.  

The missing include file is a problem with the latest installation of MKL on oneapi, I have put a note on the other forum.  

The left hand side colour lines are telling you something about what you are currently editing, some times yellow bar and sometimes  green solid.  I looked for an explanation in the help file, but it eluded me.  

 

 

Screenshot_20221122_091414.png

 

The green says it does not like it.  

 

The mkl. 

With the latest install of the oneapi, the original directory structure is 

Screenshot_20221122_092157.png

The file is present in there.

 

The new directory structure is 

Screenshot_20221122_092215.png

no mkl file present and the latest holds

Screenshot_20221122_092233.png

No mkl include file.  

I have not checked the mkl forum this morning. 

But in all likelihood the blue lines is an editing code, we just have to find the list of editing codes.  

 

 

0 Kudos
mic_esp96
New Contributor I
1,852 Views

@JohnNichols ,

it actually happened the same thing yesterday. Reopened my PC after a while, to run a test on a different machine than the one I usually use at work, go to compile, and.... "ifort" command not found.

 

I went to check, and noticed Intel oneAPI installed (how, and why, no clue about) a new version, but without any binary in it. So when setting up the environment which usually refers to the "latest" symlink, then all the tools where missing.

 

Made a clean install of the new 2022.3.1 release, and removed previous versions. 

 

Yet curious why that happened though.

0 Kudos
Steve_Lionel
Honored Contributor III
1,878 Views

In a free-form file, C is not a comment introducer.

0 Kudos
FortranFan
Honored Contributor III
1,872 Views

@stedwomas wrote:

I am debugging a piece of code and I commented out some lines BUT some parts of the code have a blue /white  bar down the left hand side of the code . I save the subroutine and it compiles and builds ok , but the program  ignores the ( blue/white)  commented-out lines and in debug just ignores them and carries out the function of that line as if the exclamation is not there 

 

Any  explanation 

 

steve


@stedwomas ,

Re: "the program  ignores the ( blue/white)  commented-out lines," what program is it?  Is it really Microsoft Visual Studio with which Intel software product provides an integration in conjunction with the Intel Fortran compiler(s) also. or is this "program" some other IDE / editor?  Can you confirm?  Because the behavior with "blue /white  bar down the left hand side of the code" does NOT appear to be with Visual Studio and Intel Fortran integration.

0 Kudos
JohnNichols
Valued Contributor III
1,862 Views

There is no color coded text as you see in the screen shots I put up, wonder which IDE it is?  Good call.  

Humour for the day:  

Not sure what happened on the install for the latest HPC.  

Screenshot_20221122_102809.png

0 Kudos
JohnNichols
Valued Contributor III
1,860 Views

Screenshot_20221122_105750.png

Just updated and the mkl latest folder looks normal and the program runs, was there something wrong with the mkl on the second last update.  

0 Kudos
stedwomas
Beginner
1,818 Views

Sorry ben away for a few days and thank you all for your interest - the comment on the "blue /white  bar" lines is just ignored - it was the last item I modified. I saved everything - the comment is  just ignored as though the comment does not exist - I hvent a clue what the  "blue /white  bar" is 

0 Kudos
stedwomas
Beginner
1,807 Views

The blue/white lines mean modified code from the  last check in . Gone a bit further and the debugging seems to have a mind of its own - trundling through the code, doesn't obey breakpoints , the breakpoints I put bin end up on comment lines and when you debug  putting a "F10"- the pointer skips lines. I think there is corruption in the code somewhere and the compiler has not picked it up.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,798 Views

Are you using the/a preprocessor?

Are you debugging optimized code?

 

Jim Dempsey

 

0 Kudos
Reply