123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|697|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Goto vs Gosub

Tue, 17 Apr 2018, 02:50
rockford
I haven't used GOTO or GOSUB for 20+ years. Both have pros and cond, but there should have been a ’’Neither’’ option too.
Tue, 17 Apr 2018, 02:50
cyangames
I've used GOTO twice in the last year after a long....13 year gap.

Just because the alternative would be re-structuring roughly 400 lines of code for an edge case scenario. I just don't have the time for that!

Only since using NESASM have I began to re-appreciate GOTO (Well, JMP) and GOSUB (again, JSR) commands.

Sure, they're not needed much in modern languages but can save a shit ton of time (inserts dinosaur jpeg from XKCD here)

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Tue, 17 Apr 2018, 03:25
Jayenkai
I chose Goto. Gosub still kinda exists, albeit as Function calls and things like that. You'll still "Gosub a subroutine" just as much as you did back in the days when Kryten said that.

But Goto doesn't really have a replacement, and as spaghetti-like as it made things when misused, there are occasionally some instances where I really miss being able to randomly jump about inside my code.

Kryten "If you don't gosub a program loop, you'll never get a subroutine. "

My Dwarf-memerry is faleing.

-=-=-
''Load, Next List!''
Tue, 17 Apr 2018, 06:32
HoboBen
Goto is still a thing in C! And it has its place in error handling!

-=-=-
blog | work | code | more code
Tue, 17 Apr 2018, 07:30
cyangames
Goto still exists in PHP also, yay GOTO!
Tue, 17 Apr 2018, 08:31
Jayenkai
Nah, PHPs enough of a mess!!!!
I could probably make use of it in C, but I’ve not needed it, thus far.
...

.... but don’t go giving me any ideas!!

-=-=-
''Load, Next List!''
Tue, 17 Apr 2018, 14:12
Pakz
I had not used it much after discovering the continue and exit commands. I can use it again in agk if I need to since they are in the command toolkit.