4 ms·
I've written a bit of code formatted rather like this: void foo(int x) { if(x == 0) { bar(); } } That is workable. I have adhered to it (mostly)
by kazinator 9y ago
I've written a bit of code formatted rather like this:
void foo(int x)
{ if(x == 0)
{ bar(); } }
That is workable. I have adhered to it (mostly) in this Yacc grammar file: http://www.kylheku.com/cgit/txr/tree/parser.y http://www.kylheku.com/cgit/txr/tree/parser.y
Just in the grammar; not in the supporting functions.
It's an attractive style for C statements embedded in another language, because they look more like capsules somehow.