- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why do you think it is intellisence?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This can happen if you press tab after if statement. Such sequence is perceived as insertion of the snippet IF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have observed the same problem several times...
I have observed the same problem several times...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
("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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I'll see if I can reproduce this and will let the developers know. I haven't encountered it myself.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page