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

switch to newer relational operators #603

Merged
merged 1 commit into from
Jun 14, 2024
Merged

switch to newer relational operators #603

merged 1 commit into from
Jun 14, 2024

Conversation

jbathegit
Copy link
Collaborator

As an addendum to the recent F90 modernization, I've also gone through now and switched all of the relational operators to the newer versions, which I think makes the code easier to read. So basically switching all .eq. to ==, .ne. to /=, .gt. to >, .le. to <=, etc.

This was super-easy once I cooked up a series of perl commands to do this for multiple files in a directory simultaneously. I'll share them here in case anyone else wants to use them in other libraries or codes:

perl -pi -e 's/\.eq\./==/g' *F90
perl -pi -e 's"\.ne\."/="g' *F90
perl -pi -e 's/\.ge\./>=/g' *F90
perl -pi -e 's/\.le\./<=/g' *F90
perl -pi -e 's/\.gt\./>/g' *F90
perl -pi -e 's/\.lt\./</g' *F90

@AlexanderRichert-NOAA
Copy link
Contributor

Looks good to me- I don't have a strong preference either way on which style of comparison operators to use. I haven't looked at the F90 autoformatting stuff for a while that I was experimenting with on the ip lib, but if we do go that route, this is a standard that could be uniformly applied across NCEPLIBS.

@jbathegit jbathegit merged commit 06b809b into develop Jun 14, 2024
9 checks passed
@jbathegit jbathegit deleted the jba_opers branch June 14, 2024 17:32
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.

2 participants