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

Constant externs #81

Open
stephenchouca opened this issue Oct 3, 2016 · 0 comments
Open

Constant externs #81

stephenchouca opened this issue Oct 3, 2016 · 0 comments
Assignees
Labels

Comments

@stephenchouca
Copy link
Collaborator

Currently there is no way to declare constant extern variables. The following is the proposed syntax for declaring constant externs:

const extern V : set{Vertex};
const extern M : matrix[3,3](float);

export func main()
   V.a = 1.0;  % Compile-time error, since V is read-only
   M = 1.0;  % Comple-time error, since M is also read-only
end
@stephenchouca stephenchouca self-assigned this Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant