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 Fortran varying type(*) feature to clean up (and make public) the UserComp InternalState API #95

Open
theurich opened this issue Nov 1, 2022 · 1 comment
Assignees
Labels
feature/enhancement New feature or request who: NASA Originates from NASA

Comments

@theurich
Copy link
Member

theurich commented Nov 1, 2022

Tom Clune sent us the request below. I also was thinking about the same question when I introduced type(*) for a bunch of internal inter-language interfaces a while back, but did not have the time then to deal with the public InternalState API. We do use macro ESMF_NO_F2018ASSUMEDTYPE in order to guard for compilers that do not support this Fortran language feature.

On 11/1/22 09:11, 'Clune, Thomas L. (GSFC-6101)' via esmf_support wrote:

Since the dawn of time, the procedures ESMF_ESMF_UserCompGetInternalState() and the corresponding Set have had implicit interfaces. This was necessary in earlier revisions of Fortran because the “wrapper” argument would of necessity be of varying type. With the introduction of TYPE(*), it is now possible to give those procedures an explicit interface.

Without such a change, we have to disable some checking in the NAG compiler as it otherwise complains that different types are passed for that argument. You can cheat a bit by trying to put each such call into a different file, but TYPE(*) is the “right” answer here.

I realize some older Fortran compilers may not support this feature, so it could be that the explicit interface is conditional upon compiler support.

@theurich theurich added the feature/enhancement New feature or request label Nov 1, 2022
@theurich theurich self-assigned this Nov 1, 2022
@theurich theurich changed the title Use Fortran varying type(*) feature to clean up (an make public) the UserComp InternalState API Use Fortran varying type(*) feature to clean up (and make public) the UserComp InternalState API Nov 2, 2022
@theurich
Copy link
Member Author

Tom just brought this up again in #330. I'll set the 8.9 target.

@anntsay anntsay added who: NASA Originates from NASA and removed who: unknown labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement New feature or request who: NASA Originates from NASA
Projects
None yet
Development

No branches or pull requests

3 participants