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

units-suggest ignores function internals #196

Open
jaytorry opened this issue Sep 6, 2024 · 0 comments · Fixed by #206
Open

units-suggest ignores function internals #196

jaytorry opened this issue Sep 6, 2024 · 0 comments · Fixed by #206

Comments

@jaytorry
Copy link
Collaborator

jaytorry commented Sep 6, 2024

Given a simple function with no inputs:

module simple_function

contains

    function get_lightspeed()

        ! get speed of light in a vacuum

        integer :: get_lightspeed

        integer :: lightspeed = 299792458 ! m/s

        get_lightspeed = lightspeed

    end

end

units-suggest doesn't suggest anything:

$ camfort units-suggest simple-function.f90 -l 'poly'
Suggesting variables to annotate with unit specifications in 'simple-function.f90'
Successfully parsed 0 summary file(s).
Finished running unit critical variable analysis on input 'simple-function.f90' ...
Logs:

Result... OK:

simple-function.f90: No additional annotations are necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant