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

Languages with GOTO

Name: suomynonA 2007-07-17 12:49 ID:sJhm9IHJ

Is there a modern programming language which has GOTO function in it? I know basic from a millenia ago and recently learned java, and well I hated OOP, but I could live with it if I had goto.

Name: Anonymous 2007-07-19 16:11 ID:bKSfkdkf

>>28

1) Learn C
2) Learn to write functions
3) Learn that GOTO is fucking useless

heres a better version of that code which doesn't use goto.
its shorter and easier to understand and modify.
You are a dumb fuck.


int alloc_some_things() { // this should be T but other poster is a fucking goto using idiot.
  T * foo;
 
  foo = malloc(sizeof(*foo));
  if(foo) {
    foo->member = malloc(sizeof(*foo->member));
    if(foo->member) {
      foo->another = malloc(sizeof(*foo->another));
      if(foo->another) {
    return foo; // THANK GOD WE ALLOCATED STUFF
      }
      free(foo->member);
    }
    free(foo);
  }
 
  return NULL; // learn C you fucking idiot.
}

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