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
Geschätzter Beitragender II
1.927Aufrufe

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 Antworten
jsmt
Einsteiger
1.927Aufrufe
Why do you think it is intellisence?
Yevgeny_Plyusnin__In
1.927Aufrufe
This can happen if you press tab after if statement. Such sequence is perceived as insertion of the snippet IF.
Gerald_Duff
Einsteiger
1.927Aufrufe
Hi,

I have observed the same problem several times...
Steven_L_Intel1
Mitarbeiter
1.927Aufrufe
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.
DavidWhite
Geschätzter Beitragender II
1.927Aufrufe
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
IanH
Geehrter Beitragender III
1.927Aufrufe
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).
DavidWhite
Geschätzter Beitragender II
1.927Aufrufe
("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
Steven_L_Intel1
Mitarbeiter
1.927Aufrufe
Ok, I'll see if I can reproduce this and will let the developers know. I haven't encountered it myself.
Antworten