- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pls any one help me.
Iam coverting a fortran system into java.I want to know some thing about GOTO statement.my doubt is from a if loop, i want to jump to a set a statement, so iam providing a GOTO statement there with that particular set of statements line number.after executing the set of statement whether the control send back to the if statement or i will continue the flow after the set of statement.with out any other statament like return or GOTO.
thanks
Iam coverting a fortran system into java.I want to know some thing about GOTO statement.my doubt is from a if loop, i want to jump to a set a statement, so iam providing a GOTO statement there with that particular set of statements line number.after executing the set of statement whether the control send back to the if statement or i will continue the flow after the set of statement.with out any other statament like return or GOTO.
thanks
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not entirely clear on your question. An example might help. FortranGOTO is not like a BASIC GOSUB. In order for program flow to return to the site of a GOTO, another GOTO would be required. At one time the Fortran standard permitted resumption of a DO loop in this way, but that capability has long since been removed from the standard. As modern compilers have facilities for interprocedural expansion of subroutine calls, there should not be any performance incentive for the kind of code you may be talking about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once you jump out of an IF or DO with a GOTO, you are not allowed to jump back in. The statements you jump to execute normally, there is no "end" other than the end of the program or routine.
If you want some set of statements executed and then control returned, use CALL or a function reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replies. i got my answer from your replies.
thanks you,
boobalan.c
thanks you,
boobalan.c

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page