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

Intellisence?? changing my code

DavidWhite
Valued Contributor II
814 Views

I recently had a failed compile in what I thought was unchanged code, and I found a statement
End If (.true.)
in my code.

At first I thought that is was when I reopned a solution whenthe cursor happens to have been left on the End If line. But even when I delete the (.true.) MSVS reinserts it.

e.g.

If (mOH > mHCO3) Then

...

End if


becomes

If (mOH > mHCO3) Then

...
End if (.true.)

How do I stop this happening? I'm not aware of having changed any settings in MSVS.

Thanks,


David

0 Kudos
8 Replies
jsmt
Beginner
814 Views
Why do you think it is intellisence?
0 Kudos
Yevgeny_Plyusnin__In
814 Views
This can happen if you press tab after if statement. Such sequence is perceived as insertion of the snippet IF.
0 Kudos
Gerald_Duff
Beginner
814 Views
Hi,

I have observed the same problem several times...
0 Kudos
Steven_L_Intel1
Employee
814 Views
As yplyusnin notes, pressing TAB after a keyword such as IF causes the "Intellisense"-like feature to insert the (.true.). There are a number of "snippets" like this for many Fortran constructs in our VS2010 support.
0 Kudos
DavidWhite
Valued Contributor II
814 Views
Steve,

As far as I can see, this happens without touching the keyboard, or at most by pressing the up or down arrow. There cannot even be a tab character after the End IF, as I replace tabs with spaces.

Thanks,


David

====
Just tried it again just now. File had spaces after the end if. Deleted them, left cursor after "End if", saved file, closed solution.

Reopened. End if (.true.) is there and file markes as changed. backspaced to delete the .true. it gets reinserted.

Even using Ctrl-Z removes the (.true.), but then it is automatically reinserted.

Regards,

David
0 Kudos
IanH
Honored Contributor III
814 Views
I've observed the same behaviour here, but I'm not sure what the pre-requisites are.

("End If" shouldn't be triggering that sort of snippet thing anyway, unless it was to insert a construct name picked up from the opening If).
0 Kudos
DavidWhite
Valued Contributor II
814 Views
("End If" shouldn't be triggering that sort of snippet thing anyway, unless it was to insert a construct name picked up from the opening If).

AND, even if it should be triggered, the (.true.) should be after the IF, not the END IF

David
0 Kudos
Steven_L_Intel1
Employee
814 Views
Ok, I'll see if I can reproduce this and will let the developers know. I haven't encountered it myself.
0 Kudos
Reply