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 7843301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:31:06+00:00 2026-06-02T16:31:06+00:00

In my attempt to gain a better knowledge of procedural programing, both for practical

  • 0

In my attempt to gain a better knowledge of procedural programing, both for practical and academic use I am trying to clarify the effect CONTINUE and BREAK statements have on state.

I have come to understand that GOTO is essentially forbidden as I go with the if you’re a good programmer you can find a better way approach. However I also understand at a deeper level that it is to be avoided in procedural programming because it lacks the ability to change state.

This is were I get confused, how is it that CONTINUE, and BREAK can change state?

My initial thought was that because a GOTO is as such:

GOTO A;
LBL A;

No expressions are evaluated and no state is changed. And combined with the form of a CONTINUE:

while (evalFunction(*value) == 1) {
  ..
  if ( bail == 1 ) continue;
  ..
}

Has the ability to change state in the while condition.

However this does not account for BREAK.

Can someone provide some more detail regarding the specifics in procedural programming?

  • 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-06-02T16:31:07+00:00Added an answer on June 2, 2026 at 4:31 pm

    I don’t know where this “ability to change state” thing comes from.

    The highest virtue of code is readability. GOTO is to be avoided because it often makes the code hard to read, and for no other reason. There are in fact cases where code that uses GOTO is easier to read than it would be if GOTO were avoided, and in those cases, GOTO should be used. A good example is the C nested cleanup idiom:

    int do_something()
    {
       int rv = -1; /* failure */
       Foo *foo = get_a_foo();
       if (!foo) goto out;
       Bar *bar = get_a_bar();
       if (!bar) goto out_foo;
    
       rv = do_something_with_foo_and_bar(foo, bar);
    
       release_bar(bar);
    out_foo:
       release_foo(foo);
    out:
       return rv;
    }
    

    This is easier to read than the alternative with nested if statements, because normal control flow is emphasized. (In C++ you would use RAII instead, of course, for even less clutter.)

    Similarly, BREAK and CONTINUE can make the code harder to read, and should be avoided when they do; however, they are in nearly every modern language because they often make code easier to read. So they are preferred to complicated if-else constructs inside loops and/or contorting the logic so that the loop exit condition can be tested at the top of the loop.

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

Sidebar

Related Questions

I am trying to use Rhino.Mocks to mock up a ControllerContext object to gain
In an attempt to better understand tables for future use, I was hoping somebody
First attempt to use this cool site - after searching for 2 hours: So
I attempt to use webservice return POCO class generated from entity data model as
In an attempt to wrap some unmanaged code in a managed .dll I'm trying
in my attempt to learn a bit faster the use of spring and hibernate
In an attempt to learn to use PInvoke in C#, I'm a little unsure
Is there any way to limit the number of attempt to gain access to
In handling a 1--->0...1 relationship, I'm trying to use a separate partial view for
If I attempt to gain an exclusive table open in FoxPro, it generates a

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.