Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Variables #31

Closed
Adrodoc opened this issue Jun 4, 2016 · 2 comments
Closed

Variables #31

Adrodoc opened this issue Jun 4, 2016 · 2 comments
Assignees
Milestone

Comments

@Adrodoc
Copy link
Owner

Adrodoc commented Jun 4, 2016

There should be at least 3 types of variables:

  • String template
  • Selecor
  • Value

A value can be assigned from a constant or selector and scoreboard.
Selectors and templates can be used for interpolation.
Values can be used for scoreboard operations like:
mySelector Scoreboard += myValue

@Adrodoc Adrodoc added this to the v2.0 milestone Jun 4, 2016
@Adrodoc
Copy link
Owner Author

Adrodoc commented Jul 26, 2016

Because values can not be used for interpolation, there should be a fourth type: literal or constant. This is a value that is known at compiletime and can therefor be used for interpolation. The keyword constant might be confusing because the variable can be changed by an assignment.

@Adrodoc Adrodoc self-assigned this Sep 25, 2016
@Adrodoc
Copy link
Owner Author

Adrodoc commented Feb 9, 2017

You should be able to define variables within a process (local variables) or outside of a process (global variables). It might be a good idea to not allow changing a global compiletime variable, because then the program would rely on the compilation order of the files.
A global variable should be accessible from other files via filename.valiablename if that file is imported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant