Small question...
#5

Either version works in for loops. There's no difference whatsoever. The difference becomes clear when you start using this in other structures. For example:
pawn Код:
new i = 1;
printf("%d", someArray[++i]);
Will access index 2. i is incremented first.

pawn Код:
new i = 1;
printf("%d", someArray[i++]);
Will access index 1. i is incremented afterwards.
Reply


Messages In This Thread
Small question... - by zDivine - 03.11.2012, 18:37
Re: Small question... - by Drake_Lopez - 03.11.2012, 19:16
Re: Small question... - by zDivine - 03.11.2012, 19:28
Re: Small question... - by TheArcher - 03.11.2012, 20:30
Re: Small question... - by Vince - 03.11.2012, 20:40

Forum Jump:


Users browsing this thread: 1 Guest(s)