Re:Tips on writing C macros
by doug11235 on Tuesday August 04, 2009 @08:49PM
(#742553)
And another feature I like about ({ }) macros (anyone know the proper name here?) is you can return values. Clearly more useful in an example a bit more complex but...
#define ADD_ONE(a) ({ a + 1; })
x = ADD_ONE(2);