- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has Intel Visual Fortran a tool to restructure a code in the staircase style?
In the case of No - is it planned?
The following is an example:
[fortran] IF ( kon.NE.0 ) THEN
IF ( mark(nmove).LT.0 ) THEN
ibon = -5
ELSE
ibon = 5
ENDIF
ELSEIF ( nsq.NE.56 ) THEN
IF ( nsq.NE.55 ) THEN
IF ( lsq.EQ.32 ) THEN
ibon = -5
ELSEIF ( lsq.EQ.39 ) THEN
ibon = -5
ELSEIF ( lsq.EQ.35 ) THEN
ibon = 10
ELSEIF ( lsq.EQ.36 ) THEN
ibon = 10
ENDIF
ELSEIF ( lsq.EQ.45 ) THEN
ibon = 2
ENDIF
ELSEIF ( lsq.EQ.46 ) THEN
ibon = 2
ENDIF
END[/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, it is not. That question was about minimizing IFs. This question is about style. How to make a code more readable. Am I writing unclear?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code you showed is in an acceptable style. Are you looking for something that converts other indentation styles to this? The VS code editor will do this as you type, though it won't reformat existing code.
There are tools that do this, such as plusFORT, but all the ones I know of are commercial (not free). Intel has no plans to create such a tool. Do a Google search for "fortran code formatter" or "fortran code beautifier".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page