Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6707697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:40:13+00:00 2026-05-26T07:40:13+00:00

Yes, I looked at various ways of implementing GOTO in java, but here is

  • 0

Yes, I looked at various ways of implementing GOTO in java, but here is the real world:
I need one of the latest fortran LAPACK routine converted to java,
see
http://www.netlib.org/lapack/timing/eig/eigsrc/dlasq3.f
e.g.:

10 CONTINUE
      IF( N0.LT.I0 )
     $   RETURN
      IF( N0.EQ.I0 )
     $   GO TO 20
      NN = 4*N0 + PP
      IF( N0.EQ.( I0+1 ) )
     $   GO TO 40
      OPS = OPS + DBLE( 3 )
      IF( Z( NN-5 ).GT.TOL2*( SIGMA+Z( NN-3 ) ) .AND.
     $    Z( NN-2*PP-4 ).GT.TOL2*Z( NN-7 ) )
     $   GO TO 30
   20 CONTINUE
      fortran code ...
      GO TO 10
   30 CONTINUE
      OPS = OPS + DBLE( 2 )
      IF( Z( NN-9 ).GT.TOL2*SIGMA .AND.
     $    Z( NN-2*PP-8 ).GT.TOL2*Z( NN-11 ) )
     $   GO TO 50
   40 CONTINUE
      fortran code ...
      GO TO 10
   50 CONTINUE

What would be a “standard” way to deal with all possible GOTOs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:40:14+00:00Added an answer on May 26, 2026 at 7:40 am

    GOTOs are considered an anti-pattern. You should never try to convert it straight to Java without considering redesigning the code.

    For example, when you see a label for GOTO, that is likely a sign that this code would be reused. Should it belong in a method to be called again in the future instead? Approach the new design using OO rather than using the same procedural train of though as that in FORTRAN.

    Java does work in the real world without GOTOs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes, There's More Than One Way To Do It but there must be a
I've got a problem with Java concurrency. Yes, I looked at questions with almost
I have looked on here and found a few examples but nothing works so
I have looked on here and anddev for a suitable response, but haven't found
I've looked over many code samples here and on other sites but I couldn't
I have looked around for a way of implementing this. Here is a pseudocode
...Yes I've seen: Best Resources for Learning JavaFX? but it doesn't really answer the
Yes, there is a similar question here . However, that question doesn't seem to
Yes, I know you could use regular objects as associative arrays in JavaScript, but
Yes we're talking about ASCII codes. My appologies I'm not the Delphi dev here.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.