|
Shirley, using goto is simpler.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
burn the heretic, burn him I say
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|
Lookit, you might not actually type the word goto , but when you compile your code, every transition from one statement to another is translated into a goto .
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
burn him (since when has facts got in the way of religion) burn the heretic
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|
Yup, religions want to be the middle man (between man and god, man and his money, etc.), so they love middle-man things, like all these statements that do nothing more than abstract the goto .
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Since we are not burning the heretic yet... Are we talking about singapore[•] or the conference[○]
For those not sure what they are reading now. This is most likely your face right about now
»»» <small>Loading Signature</small> «««
· · · <small>Please Wait</small> · · ·
|
|
|
|
|
If we are not going to burn him then I going to sulk
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|
As long as you do it quietly.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
humph
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|
We don't need no water, let the ...
»»» <small>Loading Signature</small> «««
· · · <small>Please Wait</small> · · ·
|
|
|
|
|
Now I'm going to have to visit that place.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You tell me
»»» <small>Loading Signature</small> «««
· · · <small>Please Wait</small> · · ·
|
|
|
|
|
Certainly not the conference.
Not one of the presentations is about the goto .
They should be done for false advertising.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
I believe you'll find that all those accounts written hundreds of years after the alleged events were entirely factual...
|
|
|
|
|
Not true: in some machines it's called a JUMP instruction instead!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Ah, but if you look at the compiled machine code, it's exactly the same, so JUMP is just another abstraction of goto .
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: when you compile your code, every transition from one statement to another is translated into a goto .
Assuming that the "another" statement is not the one immediately following.
|
|
|
|
|
Why? Using a goto to exit a loop is one its few (perhaps only) valid use cases.
/ravi
|
|
|
|
|
I've been known to use it for "load variable amounts of stuff from DB as needed" and use goto to get to the cleanup/UI enabling at the end. It probably comes from the habit of preferring:
void someFunc()
{
if (!A)
return;
DoStuffWithA()
DoMoreCrud();
}
rather than
void someFunc()
{
if (A)
{
DoStuffWithA();
DoMoreCrud();
}
}
|
|
|
|
|
Was your reply meant for another post?
My name is not Shirley. Sure, my post was about flow control, and could compile into goto (/jump) instructions, they are certainly not The Answer in this case.
|
|
|
|
|
An elegant solution, Shirley!
Will Rogers never met me.
|
|
|
|
|
Why, thank you, Shirley.
They say that elegance is simplicity, so I must be pretty elegant.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Goto the cockpit and see what the hold up is.
And don't call me Shirley.
|
|
|
|
|
What about this?
foreach (x in someContainer)
{
ret = someFunction(x);
}
int someFunction(whatever x)
{
if (someCondition) return 1;
if (someOtherCondition) return 2;
return 3;
}
Is this close to what you meant, or did I miss the point?
|
|
|
|