neatest way to have 2 for loops co-exist
which is better
Code:
Code:
|
The second one isn't correct because you're missing the first { bracket for the first for loop, but even then, I'd still go with the first example, unless you need to repeatedly assign gi_cvar within the second loop.
|
Actually if the inner for loop is the only block of code within the outer for loop in the second way, then it should be fine. Anyways, go with the first. The variable assignment isn't exactly taxing but its still nice to keep a good scope hierarchy.
|
| All times are GMT -4. The time now is 16:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.