Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. do you use goto? [modified]

do you use goto? [modified]

Scheduled Pinned Locked Moved The Lounge
phphtmldatabaseoraclecom
65 Posts 41 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Patrick Klug

    Hey guys, My former team mate used goto's quite often (to my despair). I just published a small post on when to (not) use goto on my blog[^] where I try to look at this in a pragmatic way. I am interested if you are using goto's (or know someone who does?). Opinions? cheers, Pakl PS: This is just a blunt advertisment for my blog so I can lure you into it and become rich and famous. :-\

    Listen to the toad! www.dotnettoad.com[^]

    modified on Monday, May 19, 2008 4:44 AM

    R Offline
    R Offline
    Roger Wright
    wrote on last edited by
    #61

    I haven't used a GOTO in a long time, though it was perfectly natural to use it when there was little else available. Considering that I started with JP, JZ, JNZ, etc, GOTO seemed a logical next step. Now that modern languages include so many more functional constructs, it would be difficult to find a reason for using GOTO. I suspect that, if the need existed, it would be due to timing/memory constraints and I'd be smarter to go back to Assembly code to optimize the routine. That being said, I don't consider the use of GOTO bad form, if it's appropriate to the problem at hand - a state machine implementation, for instance.

    "A Journey of a Thousand Rest Stops Begins with a Single Movement"

    1 Reply Last reply
    0
    • R Ri Qen Sin

      I use label: … goto label whenever I have to use while (true) { … }

      So the creationist says: Everything must have a designer. God designed everything. I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #62

      Break?

      1 Reply Last reply
      0
      • P Patrick Klug

        Hey guys, My former team mate used goto's quite often (to my despair). I just published a small post on when to (not) use goto on my blog[^] where I try to look at this in a pragmatic way. I am interested if you are using goto's (or know someone who does?). Opinions? cheers, Pakl PS: This is just a blunt advertisment for my blog so I can lure you into it and become rich and famous. :-\

        Listen to the toad! www.dotnettoad.com[^]

        modified on Monday, May 19, 2008 4:44 AM

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #63

        An occasional goto case in C#. Otherwise not since I advanced from BASIC.

        1 Reply Last reply
        0
        • P Patrick Klug

          Hey guys, My former team mate used goto's quite often (to my despair). I just published a small post on when to (not) use goto on my blog[^] where I try to look at this in a pragmatic way. I am interested if you are using goto's (or know someone who does?). Opinions? cheers, Pakl PS: This is just a blunt advertisment for my blog so I can lure you into it and become rich and famous. :-\

          Listen to the toad! www.dotnettoad.com[^]

          modified on Monday, May 19, 2008 4:44 AM

          R Offline
          R Offline
          Robert Royall
          wrote on last edited by
          #64

          I've had to use GOTO for programming Access/VB6 forms when doing error handling. It was basically a poor man's version of the Finally block, used to clean up objects or database connections/recordsets. I don't think I've ever had any other instances where it was appropriate.

          Imagine that you are hired to build a bridge over a river. The river gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your contract says you can't use concrete or steel - the client only provides timber and cut stone (but won't tell you what kind). Gravity changes from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer

          1 Reply Last reply
          0
          • B BadKarma

            Thanks allot leppie :mad: now i'm forced to make jumps :laugh:

            Learn from the mistakes of others, you may not live long enough to make them all yourself.

            enhzflepE Offline
            enhzflepE Offline
            enhzflep
            wrote on last edited by
            #65

            short jmps, long jmps, near jmps or far jmps?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups