View Single Post
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 01-01-2010 , 04:57   Re: Optimizing Plugins: For Loop Comparisons
Reply With Quote #6

dygear you are right.
it's more or less the same.
The difference is just the namespace.
Code:
new string[256] = "something long, that's what she said."; new len = strlen(string); for (new i = 0; i < len; i++) { // len is visible here } // len is still visible here

Code:
new string[256] = "something long, that's what she said."; for (new i = 0, len = strlen(string); i < len; i++) { // len is visible } // len isn't visible here
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet