r/Basic • u/CharlieJV13 • Feb 15 '23
BAM Update: For one dimension arrays: 🆕 Array initialisation 🆕 Constant Arrays
https://basicanywheremachine-news.blogspot.com/2023/02/for-one-dimension-arrays-array.html
3
Upvotes
View all comments
Show parent comment
1
u/zxdunny Feb 15 '23
I think the value would be readability and obvious structure for the user. Sure, you can do DIM p(3,2)=1,2,3,4,5,6 but the grouping isn't obvious where DIM p(3,2)=(1,2),(3,4),(5,6) has obvious structure.
As for consts, I'm gonna refrain from looking at wwwBASIC as it's almost certainly implemented completely different from mine - and consts have an enormous speed benefit for my interpreter which you may not get from JS indeed.