Creating array
#6

A static global is no different than a new global, except that static variables are always restricted to the file they are in. A static local acts like a global variable (without it actually being global) but only within the function itself. It remembers its value between seperate function calls. The wiki explains this very well: https://sampwiki.blast.hk/wiki/Keywords:Initialisers#static

The const modifier declares the created variable as a constant. This means the variable will not be stored on the stack and that it cannot be modified by code. If you try to modify it the compiler will complain.
Reply


Messages In This Thread
Creating array - by Shabi RoxX - 05.02.2012, 15:41
Re: Creating array - by [XST]O_x - 05.02.2012, 15:48
Re: Creating array - by Shabi RoxX - 05.02.2012, 15:51
Re: Creating array - by Jefff - 05.02.2012, 15:56
Re: Creating array - by Shabi RoxX - 06.02.2012, 09:15
Re: Creating array - by Vince - 06.02.2012, 09:39

Forum Jump:


Users browsing this thread: 1 Guest(s)