Blitz3D V1.118 now available


Blitz3D V1.118 is now available!

This update contains a few minor tweaks that have been requested by SGD devs (including myself):

* You can now use /* and */ to comment out a multi-line block of text. These tokens must appear at the start of the lines they appear on to be recognized, unlike C++ where they can appear anywhere. Note that block comments are not yet handled by the syntax highlighter in the IDE so will look just like 'normal' code. Syntax highlighting will be added to the parser at some point in the future when I get enough spare time. (Hope I haven't ruined your day Dabzy).

* You can now use :Int, :Float and :Str instead of %, # and $ when declaring variables in dialect "modern". The :Str form might look a bit weird, but that's what Blitz3d already uses for casting eg: 'Local t$=Str(n)' so I stuck with it....

This release also fixes a bug in the new modern dialect where ':' was geting mistaken for a type tag declarator instead of a statement separator, eg: in 'RenderScene:Present' etc.

Bye!
Mark

SHA256 hash of Blitz3D-V1.118.zip:
eb5b07c3f2ccf5142ddf866c1c4caec5c4ee262b6a3ab0bcc718a397a822cc02

Files

Blitz3D-V1.118.zip 25 MB
78 days ago

Get Blitz3D

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

i may be dumb but i tried to use the new :str statement, it throws a “expecting end of file”

i wrote it like this :

variable:Str = “idk”

btw please can you make it so that you can use arrays inside types

(+1)
Type tFoo
    Field tab[100]
End Type

works!

thanks :]

what about multi dimentional arrays ?

is it the same or not?

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

No, you're not dumb, well spotted, the new syntax only works for vars declared explicitly Local or Global, eg: 'Local tmp:Str ="Hello"'

I forgot you could also declare vars implicitly. I may fix this, but I'm actually tempted to remove 'implicit decls' like this from modern dialect completely.

thanks for responding :)

[quote]

Hope I haven't ruined your day Dabzy

[/quote]

Nope, I'm sure I can shoe-horn the updates into Launchpad! ;) hehehe

(1 edit)

 bro everytime if i run the application it gives me this error

(3 edits)

Thanks, closer to C without pointer and without {}, is great to me.  Even with {} is good, but this is BASIC.  

Blitz3D is going to be a  good looking BASIC, it is easy to read and easy to code . It is simple for those who do not have computer science education. It has few primitive types, it has array, has only function, and a user type that is loaded with doubly linked list. Can't be better than this. We can write thousands of useful programs, those that don't need more primitive types or OOP. Blitz3D samples and games and other simple BASIC software are the proof that light weight, relatively efficient programming software is possible with great results.

Thank you Mark, my dreams come true.

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

"These tokens must appear at the start of the lines they appear on to be recognized"

The */ has to be at the start of the line.

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()
(1 edit)

Oh, yes, you're right, sorry

Thanks

My bad, you should get an error if /* and */ are mismatched.

(2 edits)

I would like a syntax like:

Int x=0

Float y=1.5

String z="Text"

i%=10

Int ii%=15