title
can someone help me with equivalents of this snippets?
I can't understand how -- works Code:
1) for(--iAliveCount; iAliveCount >= 0; iAliveCount--) |
Re: title
-- is just -1.
if it's as a prefix the equation will be handled before the code, suffix will be handled after the code Code:
new i = 1 |
Re: title
PHP Code:
PHP Code:
|
Re: title
how can be -- replaced by ++ in provided code?
|
Re: title
They both work the same way, the value just goes in the opposite direction.
|
Re: title
Quote:
PHP Code:
|
Re: title
It depends on what you are doing and how you are using iAliveCount. The first one counts down and the second one counts up.
|
| All times are GMT -4. The time now is 02:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.