Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format the codes produced so they are easier to compare #9

Open
Beliavsky opened this issue Jun 26, 2023 · 2 comments
Open

format the codes produced so they are easier to compare #9

Beliavsky opened this issue Jun 26, 2023 · 2 comments

Comments

@Beliavsky
Copy link
Owner

Use :: in all declarations for example. Maybe use an auto-formatting tool for Fortran code.

@Beliavsky
Copy link
Owner Author

You can specify the name of the variable in which the result is to be stored and suggest that loop variables be named i, j, k etc. In a main program you can move assignments to variables (as opposed to named constants) from declarations to code after declarations. So

integer :: i=1

becomes

integer :: i
i = 1

@Beliavsky
Copy link
Owner Author

In style instructions you can specify that one-line-if statements

if (tf) statement

are preferred over

if (tf) then
   statement
end if

when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant