Hacker News new | ask | show | jobs
by doug11235 6156 days ago
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);

1 comments

They are called statement expressions.