Skip to content

Proposal for default value of optional function/subroutine arguments #41

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

Closed
kaigaox opened this issue Oct 23, 2019 · 3 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@kaigaox
Copy link

kaigaox commented Oct 23, 2019

Fortran cannot set default value in function/subroutine definition for optional arguments. This is an apparent inconvenience if there are multiple optional arguments, compared with C/C++. In such case, using if(present()) can become rather cumbersome. I'd hope that future fortran has such functionality.

@certik
Copy link
Member

certik commented Oct 23, 2019

@nebulaekg thanks for reporting this. Isn't this a duplicate of #22?

@kaigaox
Copy link
Author

kaigaox commented Oct 23, 2019

@nebulaekg thanks for reporting this. Isn't this a duplicate of #22?

Hi Ondrej, Yes I missed it. Sorry about this. -Kai

@certik certik added the duplicate This issue or pull request already exists label Oct 23, 2019
@certik
Copy link
Member

certik commented Oct 23, 2019

@nebulaekg no worries! Go ahead and upvote #22 or comment there with improvements. I am going to close this one.

@certik certik closed this as completed Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants