Results 1 to 2 of 2

Thread: Gosub?

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Gosub?

    I've been programming for a very long time - on many different platforms and languages (from assembler through all the common 3GL's and many, many 4GL's).

    At any rate, I understand how spaghetti code can be created. I've been team leader on many projects and had dozens of different programmers work for me. I've seen overuse of GOTO - up/down/all over the place - impossible to support or modify.

    But at times we have to develop truly fast code - algorithms to schedule students into classes - report writer engines - stuff like that.

    With all that said, I see a purpose for GOSUB. It jumps into a routine - executes - and returns to the point of call. Very much like a SUB or FUNCTION - but without the overhead of framing memory for new local variables and what not. I think ASM programmers would appreciate this logic flow requirement.

    It's not like I use GOSUB much - but I think I know when it can be used.

    Does anyone else feel this way? I just found out it's gone in VB.Net - not like we can't re-tool the 4 or 5 places we might use it. But what's up with that?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Gosub?

    I haven't used one in VB, despite using them constantly in QB. In fact, I kind of forgot about using them. The only way to use them is to call a line label, and I only use those for on error statements. I can see where I would have used them a few times if I had to re-write my app. I have learned to live without them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width