Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

ocmar

7
Posts
13
Following
A member registered Jun 07, 2015

Recent community posts

(1 edit)

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

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
Type tFoo
    Field tab[100]
End Type
(1 edit)

Oh, yes, you're right, sorry

Thanks

No, I mean this case breaks the End command:

Dialect "modern" 
Repeat 
Until KeyHit(1)  
/* comment */ 
End

And another example:

Dialect "modern"
Repeat
Until KeyHit(1) 
/* comment */
Local i=0 
For i=0 To 10
DebugLog(i)
Next 
WaitKey()

In this case we will not get the results from the DebugLog function in the debugger. But when we remove the comment, the Debug Log function will show the results

Dialect "modern"
Repeat
Until KeyHit(1) 
Local i=0 
For i=0 To 10
DebugLog(i)
Next 
WaitKey()

Btw, when I try to end the program in debug mode using the escape key, these 2 pieces of code work differently:

Dialect "modern"
Repeat
Until KeyHit(1) 
/* comment */
End


Dialect "modern"
Repeat
Until KeyHit(1) 
;/* comment */
End

Thank you Mark, my dreams come true.