What do global variables do?
I've been looking through the source of different plugins, and many of them have variables declared like "new g_varname". These are global variables right? What do they do, and how are they different from regular variables?
|
Re: What do global variables do?
http://en.wikipedia.org/wiki/Global_variable
In a nutshell, they are accessible throughout the plugin and retain their value similar to a static variable. Global variables are not limited to the Pawn language or AMX-X. You can search the net for "global variables" to find more info. |
Re: What do global variables do?
Thanks, now i understand :D
|
Re: What do global variables do?
There are two types of varibles in programming languages:
1) global 2) local Global can be accessed from the whole plugin, while local variables can only be accessed in the function where you declared it. PHP Code:
|
| All times are GMT -4. The time now is 07:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.