Add += and ++ possible?

sitajony

Active Member
Licensed User
Hi, I asked me if it's possible to add like in C#, C++, JavaScript, PHP etc... this:
B4X:
var=0
var+=5
var-=2
'var=3

'And:
var=0
var++
var++
var--
'var=1
It's easier and faster than var=var+5 or var=var+1...
Thanks for your comments!
 

mjcoon

Well-Known Member
Licensed User
I have to agree with Erel.

Especially since in C etc the construct can be used in an expression. Then not only does the variable to the left of the "=" become altered by executing an assignment statement, so can variables in the right-hand expression.

Mike.
 

sitajony

Active Member
Licensed User
Effectively there'll be a confusing with Syntax C and VB who are not the same things...
It was just an idea...
Thanks, I'm thinging for new ideas ;)
 
Top