[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Please translate this easy snip of C++ to Lua
- From: Stephan Mantler <step@...>
- Date: Thu, 09 Dec 2004 01:25:41 +0100
Philip Plumlee wrote:
Luists:
Ogle this awesome snip of C++:
#define TRACE_(x) cout << #x ": " << x << endl
can't help with the Lua translation, but i'd suggest using (x) instead
of the bare x, or you might run into operator precedence problems:
TRACE_( (flags & 1) ? "yep" : "nope");
-step
--
DI Stephan Mantler
VRVis center for virtual reality and visualization
e-mail: step@vrvis.at web: http://www.vrvis.at/