Re: Variables scope
Thatcher Ulrich <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
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
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557