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

Fortran 77 print instead of write(*,*) #52

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

scivision
Copy link
Member

@scivision scivision commented Dec 30, 2019

I didn't see this discussed previously--

write(*,*)

is for printing to console. This makes it harder to recursively search files for where console output is given with special formatting etc.

I would kindly suggest to consider Fortran 77 standard print, which is identical at the assembly code level.

@scivision scivision changed the title Fortran 77 print instead of non-standard write(*,*) Fortran 77 print instead of write(*,*) Dec 30, 2019
@jacobwilliams
Copy link
Member

Is write(*,*) really nonstandard? I never knew that.

@scivision
Copy link
Member Author

yea I was wrong there, I was thinking in Fortran 2003 terms. In any case, I think the issue is over being able to find where non-stdout text is / is not being output, I have found it convenient to use print, which is identical from the compiler's perspective.

@milancurcic milancurcic self-requested a review December 30, 2019 21:28
Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me. For simple messages to stdout I prefer this form as well.

@jacobwilliams
Copy link
Member

how about using output_unit?

@certik
Copy link
Member

certik commented Dec 30, 2019

I also only use print, never write(*,*). +1 to merge.

@certik certik merged commit 985ea13 into fortran-lang:master Dec 30, 2019
@certik
Copy link
Member

certik commented Dec 30, 2019

@jacobwilliams are you thinking of something like this:

use iso_fortran_env, only: output_unit
...
write (output_unit, *) ...

? That seems more complicated than just:

print *, ...

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

Successfully merging this pull request may close these issues.

4 participants