Re: [GD-General] Variables scope
Brought to you by:
vexxed72
From: Thatcher U. <tu...@tu...> - 2004-02-04 22:13:36
|
On Wed, Feb 04, 2004 at 03:46:51PM +0100, Magnus Auvinen wrote: > I've always used this: > > #define for if(false); else for > > It will behave correctly in your case as well. Those macros scare me a little; I prefer work around it explicitly with extra braces, like this: for (int i = 0; i < 10; i++) { /* whatever */ } {for (int i = 0; i < 20; i++) { /* whatever */ }} Although some people may consider that ugly. -- Thatcher Ulrich http://tulrich.com |