value:+1 instead of...

BlitzMax Forums/BlitzMax Programming/value:+1 instead of...

hey im not sure if this is in the docs, but i just noticed you can do the following:

instead of value = value+1 or whatever, you can do

value:+1 etc etc XD sweet

The :+, :-, :*, :/ operators are covered in the help files.

Really like amiga blitz? bloody hell just what I wanted

here is a sample
GW=800 ; GH=600 ; GD=0 ; Graphics(GW,GH,GD)
value = 1
Repeat
	line:+24
	value:+value
	DrawText value,10,line
	DrawText Bin$(value),100,line
Until value > 1000000
Flip ; waitmouse


Really like amiga blitz? bloody hell just what I wanted
Not quite. In AmigaBlitz you would just go a+1. In BlitzMAX you need to prefix it with a ":".

Because everything is a type and a method in Max. It's... fascinating.