- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
Link kopiert
8 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Why do you think it is intellisence?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
This can happen if you press tab after if statement. Such sequence is perceived as insertion of the snippet IF.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
I have observed the same problem several times...
I have observed the same problem several times...
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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).
("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).
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
("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
AND, even if it should be triggered, the (.true.) should be after the IF, not the END IF
David
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Ok, I'll see if I can reproduce this and will let the developers know. I haven't encountered it myself.
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite