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

Change global variables defined in any function to be defined in module #88

Closed
mattsignorelli opened this issue Oct 14, 2024 · 1 comment
Assignees

Comments

@mattsignorelli
Copy link
Contributor

E.g. instead of

module A
  function setval(x)
    global a = x
  end
end

which is type unstable, we do

module A
  a::Float64 = NaN
  function setval(x)
    A.a = x
  end
end
@lllx125
Copy link
Collaborator

lllx125 commented Oct 19, 2024

Done in branch 88 defined global variables with type Float64 and initialized them with NaN.

@lllx125 lllx125 closed this as completed Oct 19, 2024
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

No branches or pull requests

2 participants