Static vs New
I know this topic has been discussed many times and I did read about it, but I still don't understand the main difference on the lowest level.
Code:
static i;Code:
for(new i = 1; i <= 10; i++) |
Re: Static vs New
There's plenty of literature out there as this is not specific to Pawn. If you are familiar with global variables, think of a static variable as a local global variable, having a local scope only to the function where it is declared.
https://en.wikipedia.org/wiki/Static_variable |
| All times are GMT -4. The time now is 18:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.