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

What the Shit

Name: Anonymous 2009-02-14 9:49

Confusing use of flags much?

int main(int argc, char** argv) {
  struct options options;
  return parse_options(argc,argv,&options) || run(&options);
}

Name: Anonymous 2009-02-14 18:19

>>9
The vernacular meaning of "do a or b" is that you only do one of them. Likewise, since evaluation short-circuits, the use of || implies that the second only executes if the first one fails.

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