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

add global scope variables #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CajunAvenger
Copy link
Collaborator

  • Adds the -> operator, variable_name -> variable_definition
  • Defining or redefining a variable with the -> operator causes it to become "globally scoped" rather than dynamically scoped. Changes to the variable at any level are retained, letting games/styles cache more expensive operations or use more permanent storage.
  • Once a variable is globally scoped, it is always. variable := value will be valid and update it globally.
  • I tried to make it so if a variable was initially declared with := instead of ->, it would be unable to be global, but i was unable to make it work

@haganbmj
Copy link
Owner

haganbmj commented Oct 2, 2024

Merged in the rest of Gen's fork so this got wrapped up in that.
#96

@haganbmj haganbmj closed this Oct 2, 2024
@CajunAvenger
Copy link
Collaborator Author

This wasn't in Gen's fork yet:
we didn't want to release it on 1 day of testing, so we only added the -> token, which just acts as :=
that way if a user uses mse 2.5.6 to run the code meant for the next version, it will just be feature incomplete rather than potentially crash

@CajunAvenger CajunAvenger reopened this Oct 2, 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

Successfully merging this pull request may close these issues.

2 participants