User forums > Using Code::Blocks

Fortran source formatting issues

(1/1)

Tosh:
I just started using the Code::Blocks editor for Fortran. I can't get the source formatter to work properly. For this simple code segment:

    print *,'hello moon'
    !left = (mybankact-tax) * number1
    !iowe = stuff-1;

I get this, when I use "Format using AStyle"

    print *,'hello moon'
    !left = (mybankact-tax) * number1
            !iowe = stuff-1;

I get these strange indents all the way down my code. Anyone know how to get this to work? This is driving me nuts. I have multiple files formatted in really odd ways and I'd like the source formatter to insert blanks/tabs in the appropriate places.

By the way, the file extension is "f.90" and all the syntax highlighting works fine, so code::blocks seems to recognize this is Fortran okay.

oBFusCATed:
Have you looked at this page http://astyle.sourceforge.net/ ?
C::B is using AStyle for this formatting and obviously AStyle is made to format only C/C++ like languages and not Fortran.

Tosh:
I did not know that. Thanks for the link.

Navigation

[0] Message Index

Go to full version