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

Fixed Format Indent

fortrandave
New Contributor I
581 Views
I have a problem with fixed format indenting. I currently have my tab and indent sizes set to 4. Starting at the left margin, when I press tab, line 8 starts where I expect (column 7). After finishing that line, I press return and tab. This puts me in column 9, not the expected column 11. So, line 8 is not as expected. Lines 9 - 13 all are intented with tab or shift-tab. They space themselves with respect to line 9. What I want to be able to do is start in column 7 and then be able to indent or outdent 4 spaces relative to column 7. What do I have to do to make this possible?



I'm using the following version of Intel/Visual Studio

Intel Parallel Studio XE 2011
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Composer XE 2011 (package 104)
Setting environment for using Microsoft Visual Studio Shell 2008 x86 tools.


Microsoft Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.

Thanks,
Dave
0 Kudos
4 Replies
martin_upsdellagrese
581 Views
You are very welcome to use my fortran indenting program if you wish. It copes with fixed and free formats. Indents on DO blocks, If Elseif End if blocks. and tries it best on loops created by GOTO statements. Send me a email for a free copy if you are interested
Martin.Upsdell@AgResearch.co.nz
0 Kudos
fortrandave
New Contributor I
581 Views
Thanks Martin. What I'm after though is for fixed format indenting to work correctly with my version of Intel Fortran.

Does anyone else have the fixed format indenting problem that I've described? Compaq Fortran 6.6 works fine and I *think* that when I had Intel with visual studio 2005, indenting *might* have worked -- it's too long ago for me to remember correctly.

Thanks,
Dave
0 Kudos
bbeyer
Novice
581 Views

Dave,

I am having the same indenting problem with Visual Studio 2010 and find it frustrating that I can't make it work like the CVF software did. I cannot get the column 6 to be recognized with a vertical green bar as it was previously either, and when making a vertical selection and hitting indent, it moves all characters from the beginning of the line rather than starting from the selection point.

Bill

0 Kudos
Steven_L_Intel1
Employee
581 Views
I suspect that it is not recognizing your file as fixed-form source. Select Tools > Options > Intel Visual Fortran > General. Are the File Type boxes filled in for free and fixed form? If not, click Reset to reset them. If you are using a file type not included in the list, add it and restart VS.
0 Kudos
Reply