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

Make [] syntax 0-based :) #15

Open
evandrodacs opened this issue Jul 7, 2024 · 2 comments
Open

Make [] syntax 0-based :) #15

evandrodacs opened this issue Jul 7, 2024 · 2 comments

Comments

@evandrodacs
Copy link

Hi! Nice project!

Can you make, by default, the array syntax 0-based ?

E.g.

var list = [100,200,300]; // same as {[0]=100,200,300}
print(list[0]) // 100

Is it possible?

Thanks in advance

@mingodad
Copy link
Owner

mingodad commented Jul 7, 2024

That would make it hard to translate Lua programs to LJS but for your own case you can try make it yourself in fork.

@evandrodacs
Copy link
Author

Sure. I thought a different syntax wouldn't cause issues in ports. Thanks anyway. :)

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