Skip to content

use "select case" for clarity/brevity #80

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

Merged
merged 2 commits into from
Jan 5, 2020

Conversation

scivision
Copy link
Member

using select case here is clearer since the condition doesn't need to include spaces, and briefer

also add "pure" where suitable

@certik certik merged commit 1f08c60 into fortran-lang:master Jan 5, 2020
Copy link
Member

@certik certik left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@scivision scivision deleted the io_select branch January 5, 2020 06:28
@@ -300,51 +300,53 @@ integer function open(filename, mode) result(u)

mode_ = parse_mode(optval(mode, ""))

if (mode_(1:2) == 'r ') then
select case (mode_(1:2))
Copy link
Member

Choose a reason for hiding this comment

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

It looks cleaner with select case.
However, I usually avoid to use select case with character since I got memory issues (leaks) with Intel Fortran compiler. Any of you observed such issues?

Copy link
Member

Choose a reason for hiding this comment

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

If there are leaks, then we'll revert it.

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