How to use "--"?
PHP Code:
Please fix my code.. |
Re: How to use "--"?
Quote:
#define Gamestarttime 20 to new g_GameStartTime = 20 |
Re: How to use "--"?
Code:
is the same as: Code:
|
Re: How to use "--"?
Gamestarttime = Gamestarttime - 1 ?
|
Re: How to use "--"?
Gamestarttime = Gamestarttime - 1;
Gamestarttime -= 1; Gamestarttime--; All are the same. Code:
|
Re: How to use "--"?
Quote:
new const will allocate memory to store the integer 20. This is how I understand it. |
Re: How to use "--"?
Right, which is effectively the same as using a constant variable. Nobody's questioning how the preprocessor works. O_o
|
Re: How to use "--"?
Quote:
|
Re: How to use "--"?
Take a closer look at what I said...
Quote:
I'm going to start spelling everything out from the start from now on. -_- |
Re: How to use "--"?
You didn't provide a context. First, you said they were the same, which is false. Next, you said they were "effectively" the same, which is also false, as detailed above.
The only similarity between the two is that you cannot change the value once it's been set. The "effect" is not the same for the machine running the program. For the programmer, I guess the two types can be used interchangeably, but I'm not sure about that. So, in that context you may be correct. |
| All times are GMT -4. The time now is 16:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.