how to emulate goto.
From: Gaurav Agarwal (gaurava_at_gmail.com)
Date: 01/31/05
- Next message: Andrew Thompson: "Re: refresh tag and APPLET"
- Previous message: nsc: "Re: problem with search engines"
- Next in thread: Thomas Weidenfeller: "Re: how to emulate goto."
- Reply: Thomas Weidenfeller: "Re: how to emulate goto."
- Reply: Jacob: "Re: how to emulate goto."
- Reply: Matt Humphrey: "Re: how to emulate goto."
- Reply: Skip: "Re: how to emulate goto."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Jan 2005 03:57:53 -0800
Hi,
In a method I intend to do the following:
void foo() {
do_processing;
if (error)
goto exit;
do_more_processing;
if (error)
goto exit;
.
.
.
exit:
return some value;
}
Since I cannot use goto in java I cannot jump to the end of a function.
Also break can only take me to the start of a loop and not to the end
of the loop.
If possible I would not want to embed "return false;" everytime I check
for error.
Any advice?
Gaurav
- Next message: Andrew Thompson: "Re: refresh tag and APPLET"
- Previous message: nsc: "Re: problem with search engines"
- Next in thread: Thomas Weidenfeller: "Re: how to emulate goto."
- Reply: Thomas Weidenfeller: "Re: how to emulate goto."
- Reply: Jacob: "Re: how to emulate goto."
- Reply: Matt Humphrey: "Re: how to emulate goto."
- Reply: Skip: "Re: how to emulate goto."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|