value:+1 instead of...

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

{cYan|de}(Posted 2004) [#1]
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


Robert(Posted 2004) [#2]
The :+, :-, :*, :/ operators are covered in the help files.


flying willy(Posted 2004) [#3]
Really like amiga blitz? bloody hell just what I wanted


bradford6(Posted 2004) [#4]
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



FlameDuck(Posted 2004) [#5]
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 ":".


Hotcakes(Posted 2004) [#6]
Because everything is a type and a method in Max. It's... fascinating.