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

Use the * format in Fortran READ statements #921

Open
Beliavsky opened this issue Nov 7, 2021 · 5 comments
Open

Use the * format in Fortran READ statements #921

Beliavsky opened this issue Nov 7, 2021 · 5 comments

Comments

@Beliavsky
Copy link

I see that there have been some Fortran codes submitted but that Fortran is not available as an option on the site. Looking at the code interactive_euclidean.f90 , I suggest that

READ(*, '(i10)', iostat=ioerror) temp_a, temp_b

be replaced by

READ(*, *, iostat=ioerror) temp_a, temp_b

which will work even if the user enters two numbers on the same line before pressing Enter.

@ShadowMitia
Copy link
Contributor

I'm not sure what you mean by not available on the site, right not there's only one chapter that has Fortran code : https://www.algorithm-archive.org/contents/euclidean_algorithm/euclidean_algorithm.html.

If you know Fortran feel free to open PRs about it!

@leios
Copy link
Member

leios commented Nov 7, 2021

Like @ShadowMitia We only have fortran code when it is submitted by community members. The only other fortran PR is #638. I am a big fan of fortran, so I would be happy to see more. If you want to create a PR about this change, feel free to do so and it will be quickly merged (I think)

@depate
Copy link
Contributor

depate commented Nov 7, 2021

I have to check later, but there's definitely more Fortran code in the AAA. E.g. Euler and velocity-verlet. (Basically search for PRs by me)

Regarding the initial issue. I have to check that later as well. IIRC that (i10) "enforces" an integer number as input, which was kind of the intention back then.

@ShadowMitia
Copy link
Contributor

@depate You're right, I'm just blind I guess...

@leios
Copy link
Member

leios commented Nov 8, 2021

Yeah, I think I have become more lax on type specifiers. I find them really useful for me, but I guess if other people don't think that's the case, we can remove them

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

4 participants