Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Whislist for all compilers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Whislist for all compilers

    Hi R&D

    Adding new statements for program flow:
    - break en continue

    Delete or ignore the Goto statement.
    I programmed structured and I haven't need goto statements

    Greetings
    Stephane

    ------------------

  • #2
    Stephane, removing GOTO would break millions and millions of lines of code that relies on it's use.

    Additionally, statements such as ON..GOTO can be used very effectively to create fast and efficient code.

    The age-old claim that GOTO is unnecessary is based on theoretical concepts, not real life programming problems.

    Sure, using GOTO can lead to "spaghetti-code", but in the right hands, GOTO is a serious statement for serious programmers.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      The solution is simple: Don't use goto if you don't need/want it. There's no reason to remove it from the language just because some programmers don't use it. It does not enhance PowerBasic in any way to do this.

      As for break, continue, see the EXIT FOR (EXIT LOOP) and the ITERATE statement. If you're talking about the SELECT statement, because your can specifiy several cases (even ranges) in on case statement, there's less need to want to continue through the cases (as C does). You could use a goto statement to cleanly accomplish this too.

      ------------------

      Comment


      • #4
        Michael,

        Thanks for your answer!

        Greets
        Stephane

        ------------------

        Comment

        Working...
        X