Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[style] one-line functions in C

Name: Anonymous 2010-04-11 13:03


int frozen(int arg)
{
  return (arg+23);
}


OR


int frozen(int arg)
{ return (arg+23); }

int frozen(int arg)
  { return (arg+23); }


OR MAYBE EVEN SCREEN ESTATE SAVING


int frozen(int arg) { return (arg+23); }


The first version would be consistent myth my usual style, but version 2.2 looks too sweet to resist.

Name: Anonymous 2010-04-11 14:23

>>14
implying that "space" can be "wasted"

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List