Quote:
Originally Posted by Skyld
How does that have anything to do with wanting "goto"?
|
PHP Code:
for( foo = 0; foo < 100; foo++ )
{
for( bar = 0; bar < 100; bar++ )
{
meh[ foo ][ bar ] = blub;
if( /* do something that would exit the loop */ )
goto( lEndL01 );
}
}
Label lEndL01:
//after loop
Quote:
Originally Posted by Skyld
It's called "return", and will end function execution there and then, regardless of how many loops you have.
|
you don't always want to end the whole function :P