- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In IVF, is there a way to locate the end of a given block structure (notably, IF...ENDIF) using the editor such asthe way other editors determine C/Java start/end by positioning the cursor on either end and pressing a "jump" key which takes the cursor to the other matchingstatement.
Another thought is if there is an option to highlight or otherwise colorize all the statements in a block?
Heavily nested code structures in Fortran have always been a time killer when they spread over several screens (hey, it's not necessarily my code :) Thx.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Visual Fortran does not supply such a feature, and the syntax of Fortran makes implementing something like that a bit harder than it is for Java and C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
longden.loo@sparta.com wrote:In IVF, is there a way to locate the end of a given block structure (notably, IF...ENDIF).
The closest I've seen to what you're looking for are the f90 and fortran modes in emacs (either GNU emacs or Xemacs). You could try getting emacs (it's about an 18 MByte download) or Xemacs, and see if the f90 or fortran modes are close to what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. It turns out the VIM editor also has some kind of macro (called "matchit") written to support this function. Since I already use VIM (for other things), I might look into this since the needed macro is already packaged (but not activated by default).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a simple trick I use in the Visual Studio.NET IDE. The IDE editor has some macros built in. One of which is to find the matching curly brace of a C/C++ program. Braces are not used in .F90 but that does not mean you are prohibited from using them within comments. Try
do I=1,foo ! {
...
! {
if(expr)
! {
...
! }
else
! {
....
! }
endif
! }
enddo ! }
This works for me. It does mean you have to be vigilent about inserting the braces.
Jim Dempsey

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