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

collapse/expand the codes in fortran?

Mike896
Beginner
1,123 Views

Hi

Iwonderwhen to use Edit->Outlining in IVF.

I surf in MSDN. People say it can collapse/expand the codes to definitions.

In C++, it can define class and they can be collapsed and expanded.

What is definition (the class or something else) of Fortran?Can IVF (version 11.0) has a plus sign in the beginning of defined class(I heard fortran2003 can define a class, since I never use it, I guess it here)?

Mike

0 Kudos
5 Replies
Les_Neilson
Valued Contributor II
1,123 Views
Outlining is used in the following way in Fortran code.
Highlight a block of code. (for examplea long IF/ELSE/ENDIF block of code; but it could be any block of code)
Right mouse click brings upa popup menu :
choose OUTLINING->Hide Selection
You now have a + [...] where the code was(is)
If you hover the mouse over the [...] it will show the hidden code in a popup box
If you click the + it will expand the code and show a - in place of the +
Click the - to hide the code again.
If you right-click and choose Outlining->Stop Outlining then all of the outining in that code is removed.
You also have the option to Toggle All Outlining (ie Show all hidden code / Hide all outlined code)
HTH
Les

0 Kudos
abhimodak
New Contributor I
1,123 Views

There have been a few threads on this forum, tracing back more than a couple of years, pertaining to general editor improvements such as source browsing, intellisense etc. Fortran sensitive "collapsible code" is one such sub-feature.

Currently, there is no "automated way" of doing this for Fortran. Although, the procedure described in the previous post works, you may find that the outlining is not retained when you open the file next time. I believe it will be there if (and when) the file is opened through a project and not on its own. Thus, apparently the outlining information is stored with the solution/project but since the editor is not Fotran sensitive from a outlining sense, the file outlining information is lost for the individual file.

I hate to say this but; there are other compilers (and editors) that integrate with visual studio and provide a better editor. If you have access to those, you can do some tricks to use those editors with Intel compiler.

Previously, Steve Lionel has pointed out that editor enhancements, although not off the list, is not a priority for Intel development. Although quite frustrating, I can see why that may be.

Sincerey

Abhi

0 Kudos
Mike896
Beginner
1,123 Views

Thank you for the information.

Yes, the outlining can be saved in a project. I'ved tried. I'd like to see the IDE can automatically do outlining for fortran programmer.

I don't like to do it manually. So the point is which part of programs or what definitions needed to be outlined.

Does IVF v11.0 do this?

Mike

0 Kudos
abhimodak
New Contributor I
1,123 Views

No.

I am using 11.0.039 Beta. It has a lot of F2003 features; but no editor enhancements. At least, I don't find any.

Abhi

0 Kudos
Mike896
Beginner
1,123 Views

Oh, what a pity.

Than you for the reply.

Mike

0 Kudos
Reply