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-21 20:18 ID:MbGbf096

>>64
ooh, I forgot

a:
 do1();
b:
 if(do2()) goto a;
c:
 if(do3()) goto b;
d:
 if(do4()) goto c;
 if(do5()) goto d;

becomes
void a()
{
   do1();
   b();
}
void b()
{
   if(do2()) a();
   else b();
}
void c()
{
   if(do3()) b();
   else d();
}
void d()
{
   if(do4()) c();
   else if(do5()) d();
}

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