Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

From Blit3D docs:

Since a recent Blitz update you can now do what are called 'blitz arrays'. These are very different to a Dim'd array, in the following ways:
They use square brackets [] instead of the normal round ones ().
You declare them like you do Local or Global variables, example: Local myArray[10]
They cannot be multi-dimensional, and cannot be resized.
They can be stored in Type objects.
They can be passed to functions. 

But you can simulate a multidimensional array:

Const WIDTH = 10
Const HEIGHT = 10
Local tab[WIDTH * HEIGHT]
;set value to tab[5, 7] 
Local x=5, y=7
tab[x + y * WIDTH] = 1234
;get value from tab[5, 7]
Local value = tab[x + y * WIDTH] 
Print value
(1 edit)

It has many limitations, but it can be useful in some situations

thanks :)

the [] reminded me of c lol

thought i can do [][][] to declare a multi dimentional array but i was wrong