Raised This Month: $ Target: $400
 0% 

Creating static inside loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-13-2014 , 20:39   Re: Creating static inside loop
Reply With Quote #1

I wouldn't worry about it since you shouldn't ever do it.
__________________
fysiks is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-13-2014 , 20:50   Re: Creating static inside loop
Reply With Quote #2

Static variables are stored in the DAT section of the plugin and are present for the entirety of the plugin's lifetime, which means that allocation happens automatically with loading your plugin. It should be obvious by their behavior that, even though they are scoped in the code syntax and the compiler enforces this, they technically are not local to the function. They work exactly the same as global variables in this respect - you just can't access them the same way through code.
__________________
In Flames we trust!

Last edited by Nextra; 06-13-2014 at 20:51.
Nextra is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode