|
-
Jan 9th, 2005, 05:15 PM
#1
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?
-
Jan 10th, 2005, 09:46 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|