Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] refactoring suggestion

Hi,

some time ago somebody on this list asked for refactoring suggestions so that he could give it as an assignment to students. I couldn't find that email in the Photran mailing list archives, so maybe somebody can pick this up or forward.

The following refactoring idea seems useful and easy to implement (please let me know if it already exists):

Replace all tabs with ('x') spaces in current file / project (and maybe also other way around). The integer x is optional.

The reason is that - as far as I know - tab formatting is a non-standard extension in Fortran 95 (I think it has been included in Fortran 2003). Also, tab formatting can look different (and even messy) when you open the same file in different editors. Nonetheless, much legacy code does have a lot of tabs.

I am aware that the Photran/Eclipse preferences have the option 'insert spaces for tabs', but this applies only when writing new code, so the refactoring would fit in smugly.

Best regards


Daniel




Back to the top