Difference between ++var and var++ ?
As the title says, what is the difference between doing ++var and var++ ?
I've been searching but found nothing... |
Re: Difference between ++var and var++ ?
preincrement
x = ++var means: PHP Code:
x = var++ means: PHP Code:
|
Re: Difference between ++var and var++ ?
You can find the answer here too : http://wiki.amxmodx.org/Pawn_Tutorial#Expressions
|
Re: Difference between ++var and var++ ?
So, it works like this?:
PHP Code:
|
Re: Difference between ++var and var++ ?
It determines the return value of var; var++ gives you the value prior to the increment while ++var gives you the value after the increment.
var = 10 x = var++ x = 10, var = 11 var = 10 x = ++var x = 11, var = 11 |
Re: Difference between ++var and var++ ?
Alright, got it :)
Thanks |
| All times are GMT -4. The time now is 08:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.