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

array name could be a constant #250

Open
Tracked by #277 ...
x87 opened this issue Sep 9, 2023 · 2 comments
Open
Tracked by #277 ...

array name could be a constant #250

x87 opened this issue Sep 9, 2023 · 2 comments
Labels
Milestone

Comments

@x87
Copy link
Collaborator

x87 commented Sep 9, 2023

currently this code does not compile:

const arr = 1@
arr(0@,1i) = 0

this code, however, does:

int arr[1]
arr[0@] = 0

https://github.com/sannybuilder/dev/wiki/Grammar#arrays

@x87 x87 added priority:p3 Low priority type:nice-to-have minor enhancements scope:compiler labels Sep 9, 2023
@x87
Copy link
Collaborator Author

x87 commented Sep 17, 2023

also works with opcode

0004: arr(0@,1i) = 0

@x87 x87 added this to the v3.9.1 milestone Sep 17, 2023
@x87 x87 mentioned this issue Sep 17, 2023
7 tasks
@x87 x87 closed this as completed Sep 18, 2023
@x87
Copy link
Collaborator Author

x87 commented Oct 15, 2023

does not work with float and string arrays

const arr = 1@
arr(0@,1f) = 0.0
const arr = 1@
arr(0@,1s) = ''

@x87 x87 reopened this Oct 15, 2023
@x87 x87 modified the milestones: v3.9.1, v4.0.0 Oct 15, 2023
@x87 x87 mentioned this issue Oct 15, 2023
59 tasks
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