WurstScript icon indicating copy to clipboard operation
WurstScript copied to clipboard

Jurst can't use multi-dimensional arrays

Open Cokemonkey11 opened this issue 10 years ago • 3 comments

Jurst aims to support vJass, but multi-dimensional arrays are not included - they raise an error "Only one-dimensional arrays are supported currently." in Eclipse.

Fixing this shouldn't be too complicated I would imagine.

Cokemonkey11 avatar Sep 08 '15 21:09 Cokemonkey11

rel https://github.com/peq/WurstScript/issues/364

Crigges avatar Sep 09 '15 00:09 Crigges

Maybe a better approach is to use a custom data type or module instead of a built-in language feature. Then you could also decide whether sizes are dynamic or static, whether to do bound-checks or not, and so on.

#297 might help to make it look very similar to native arrays.

Support from the compiler is probably only required, if you want more than 8191 entries.

So: this feature might be nice to have, but it would not give too many benefits compared to a library. Therefore I would give it a low priority.

peq avatar Sep 09 '15 18:09 peq

Maybe a better approach is to use a custom data type or module instead of a built-in language feature. Then you could also decide whether sizes are dynamic or static, whether to do bound-checks or not, and so on.

Isn't it true that plain JASS already has a weird static/dynamic syntax?

I think int array q and int array w[5] are both valid, and dynamic sizing will only work for the first. Am I misled?

Cokemonkey11 avatar Sep 14 '15 07:09 Cokemonkey11

Jurst is deprecated

Frotty avatar Nov 29 '23 18:11 Frotty