View Single Post
Author Message
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 06-13-2014 , 18:22   Creating static inside loop
Reply With Quote #1

Code:
for ( new i ; i < gSayCmdCount ; i++ ) {     static TempString2[32]; }
vs.
Code:
static TempString2[32]; for ( new i ; i < gSayCmdCount ; i++ ) { }
Is there a difference or will it only do stuff the first time, when it is initialized?
I thought about using this to prevent wasting that (32 CELLS!!!! of) memory unless there actually is a count. But if it comes at the cost of CPU load it's useless.
__________________
Black Rose is offline