Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Anti-Anti-goto. Post Here!

Author
Message
DeadTomGC
13
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 20th Nov 2010 05:26
Why is there so much hate toward the use of goto statements? One might say that I am biased because I grew up with goto statements as my only other control statement besides If-Then. However, just practically speaking, it is far more efficient to use the goto statement instead of loops in many circumstances that require very complicated logic. More to follow...

[url="http://www.armchairempire.com/"][/url]
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Nov 2010 06:22
Yes but they make your code confusing, disorganised, makes it lose it structure, and makes it hard to maintain. The only time I have ever considered using goto is to jump out of nested loops, but even at that it's not entirely necessary.

"everyone forgets a semi-colon sometimes." - Phaelax
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 20th Nov 2010 08:37
Goto's are nasty, they worked for qbasic like a charm but they are not very efficient as you are just jumping around your code, plus there are much more organized ways to do things, such as a gosub(basic), or a function(c++ and basic)
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th Nov 2010 11:39
GOTO is fine if you never intend to share your code, and you are comfortable with your code structure. So long as you don't make any logical errors that will cause program stack issues you're unlikely to see any performance issues.

However...in the real world of programming where you share your code and expect others to maintain it, it's very bad practise. Having said that, I have worked with code on software with a million dollar price tag and several million lines of code that uses GOTO.

Personal opinion - I NEVER use GOTO, there is no situation that makes it essential.

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Nov 2010 12:24
I only ever use it in visual basic for error trapping, you can add a command 'on error goto ...', which can be used to provide better feedback, flag bugs etc. Or if your sick of it all, just use 'on error resume next' and hope for the best .

It has very little use in DBPro.

Health, Ammo, and bacon and eggs!
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 20th Nov 2010 14:24
GOTO's are the best thing about programming...

lazerus
16
Years of Service
User Offline
Joined: 30th Apr 2008
Location:
Posted: 20th Nov 2010 15:31
I take goto commands, are used after a met condition where it runs another block of code somewhere else? // or changes the logical order of a program instead of using a indent and coding it below type scheme?

*coding noob in everything but learning java*

RalphY
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: 404 (UK)
Posted: 20th Nov 2010 16:24
Why goto is considered bad.

Go banana! | Super Nintendo Chalmers! | When I grow up I'm going to Bovine University!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 20th Nov 2010 16:25
Quote: "Yes but they make your code confusing, disorganised, makes it lose it structure, and makes it hard to maintain. "


You're missing a can in there somewhere. It's only misuse of GOTO that is bad. In most cases I don't use it, although it has its uses in efficient self-contained functions in C++ and jumping about inside switch statements.

In short, GOTO is probably never necessary but in certain cases it can make code more efficient and easier to understand (yes, I said it). Beginners should avoid it like the plague but experts know its uses.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Nov 2010 17:47
GOTOs don't fit in with my style of programming. I like to have a short main loop that calls all the routines and functions, jumping off to some other place would just break the program.

GOTO caters to the beginner's logic of how programs work, which is wrong/inefficient. Lots of beginners use GOTO because their programs run in one long stream and they need to jump about to control it. There's no real structure when you use GOTO, it's all a mess.


Do oranges know what colour they are?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Nov 2010 22:45
I seem to remember that at one point in time (relatively recently), the density of GOTO statements within the core of the Linux kernel was around 1 GOTO for every 60 lines - that's hardly beginners code, or inefficient, or unstructured.

@RalphY,
Pointing to a 40+ year old letter, where the author believed that both the meaning and the reaction to it was overblown, doesn't prove anything either way. Yes, Dijkstra was a genius in his field, but as a counter-example, so is Donald Knuth, who made case both for and against using GOTO, depending on what problem was being solved.

And that's the key in my view - if GOTO solves the problem you are trying to solve better than any other option, then why not use it?

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
RalphY
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: 404 (UK)
Posted: 20th Nov 2010 23:52
And that's why I didn't say GOTO was bad, I said that was why it's considered bad, because if you do a search for why GOTO is considered bad it almost always ends up back at that article. Whether it proves anything either way is besides the point, it still played a big part in GOTOs fall from grace.

Go banana! | Super Nintendo Chalmers! | When I grow up I'm going to Bovine University!
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 21st Nov 2010 00:15
Time to call in Grog haha

Fatal Berserker
13
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 21st Nov 2010 02:16
Do this.
Make a 1000 line app filed with gotos.

Wait till you have forgotten what each bit does.

Come back.

Try and figure it out...

Smoke me a kipper, ill be back for breakfast.

MMORPG -- Many Men Online Role Playing as Girls

G.I.R.L -- Guy In Real Life
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Nov 2010 02:30
I didn't word my statement very well, I wasn't saying GOTO is a command that only beginners use; I meant they rely on it because their program design is so bad that only by using GOTO and forcing the program to jump all over the place will their code work. I think GOTO is a unique command and it has its uses (I've only ever used it in de-bugging) and I wouldn't like it to be removed, but I think it should be kept from beginners until they can write a complex program without it. I have never needed to use GOTO other than de-bugging, can someone give an example where GOTO is the best command to use?


Do oranges know what colour they are?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 21st Nov 2010 04:12 Edited at: 21st Nov 2010 04:13
This is the only time I would ever do it:




[edit]
But then again, any decent programming language with exception handling does the job a lot better.

"everyone forgets a semi-colon sometimes." - Phaelax
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 21st Nov 2010 05:33 Edited at: 21st Nov 2010 05:35
Personally, there's way too much blame put atop GOTO's for people producing so called ugly programs. Back in the day, there wasn't much choice. But structured programming has slowly but surely removed much of the need. It's still there for those times when you paint yourself into a nice corner.

It's futile jumping up and down on the goto bandwagon, when there's much more important stuff that new programmers have to learn into order to turn their ideas into reality. Beyond basic structure, One that comes to mind would be using meaningful names for variable/arrays/functions etc etc for starters.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Nov 2010 12:08 Edited at: 21st Nov 2010 12:08
Quote: "Personally, there's way too much blame put atop GOTO's for people producing so called ugly programs."


Very true - it's a symptom not a cause.

Quote: "Back in the day, there wasn't much choice."


When was that?!! I don't think I've used one for 30 years. As others have said, I would only consider it if it saved an instruction or two in a cpu bound part of code. In most applications on this site, readable, easily understood, code is far more important.

Although I do exit from loops sometimes - is that a disguised goto?
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 21st Nov 2010 15:46
Most 8bit machines had pretty minilist implementations of BASIC. The Vic20/C64's had one of the worse and one of the best.
http://www.c64-wiki.com/index.php/C64-Commands

Although for computer science we used BBC Model B's. The implementation on those isn't that unlike BASIC today.
http://en.wikipedia.org/wiki/BBC_BASIC_programming_language

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Nov 2010 16:21 Edited at: 21st Nov 2010 16:24


Obviously, the lower the level of code you are writing, the more gotos will be used, but this is just average

[b]

Attachments

Login to view attachments
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 23rd Nov 2010 19:25
Quote: "Beginners should avoid it like the plague but experts know its uses."


This is so true. I remember having this revelation when I was chatting with a lead programmer at EA; he basically told me that sometimes it's not a bad idea to use goto.


Senior Web Developer - Nokia
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 24th Nov 2010 09:58
Quote: "Time to call in Grog haha"


I'm here now and you guys are doing great defending the Anti-Goto Order.

DeadTom already yelled at me in another thread and I replied but I forget which message it was in... he must of not liked my response and brought it here.


@ DeadTom:

Quote: "One might say that I am biased because I grew up with goto statements as my only other control statement besides If-Then. "


Many of us grew up the same way with GOTO as the only option but we have more options that are easier to deal with than using only GOTO. Do you not use the TEXT command because PRINT was the only method in the past?

GOTO is really only dangerous in newbie hands. If they think that is the only way to get things done their code is virtually unreadable and takes forever to figure out whats going on (I think the highest de-GOTO I did was 42+ GOTOs). We teach newbies to avoid using GOTO for our sanity as well as theirs.

I am not totally against GOTO. GOTO should be used at least once by newbies to understand how it works but after that they should only use GOSUBs and/or functions.

Eminent
13
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 24th Nov 2010 22:12
Gotos are good for a one-way jump. If you are in a menu and want to go to the main game, why would you want to have a return and go back? Gotos are bad for proper code(is there programmers etiquette?) but they can be useful in certain situations.


Fatal Berserker
13
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 25th Nov 2010 05:37
the only time i come CLOSE to a goto... is break...

Its not that i avoid it really now, i just never see its use....

Smoke me a kipper, ill be back for breakfast.

MMORPG -- Many Men Online Role Playing as Girls

G.I.R.L -- Guy In Real Life
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 25th Nov 2010 06:56
If given the option to remove either GOTO or GOSUB, I'd choose GOSUB in a heart beat. It's value has greatly diminished in a world of functions/procedures today.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 25th Nov 2010 13:33
"Do this.
Make a 1000 line app filed with gotos.

Wait till you have forgotten what each bit does.

Come back.

Try and figure it out..."

Try to do the same thing without Goto's ... if you can't write code with goto's that you can follow ... you'll have just as hard a time without them. It's not what you use in the code; it's how you done the code. I have many codes over 1000 lines that I haven't touched in years and I can go right back and pick back up on them anytime I want. Some use goto's and some don't. It's all in the names you use and the layout. Then any code reads like a book. I have horrible codes posted and they were all rushed. And I can still follow all of them.

Slow Programmer
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location: USA, Tennessee
Posted: 25th Nov 2010 14:38
Quote: "Try to do the same thing without Goto's ... if you can't write code with goto's that you can follow ... you'll have just as hard a time without them. It's not what you use in the code; it's how you done the code. I have many codes over 1000 lines that I haven't touched in years and I can go right back and pick back up on them anytime I want. Some use goto's and some don't. It's all in the names you use and the layout. Then any code reads like a book. I have horrible codes posted and they were all rushed. And I can still follow all of them."


Completely agree and would add that REM statements are everyone's friend and can make any code clear if used liberally and properly.

There are two kinds of computer users. Those that use Macs and those that wish they did.
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 25th Nov 2010 15:06
Quote: "Gotos are good for a one-way jump. If you are in a menu and want to go to the main game, why would you want to have a return and go back? Gotos are bad for proper code(is there programmers etiquette?) but they can be useful in certain situations."


You're doing it wrong.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 25th Nov 2010 18:54 Edited at: 25th Nov 2010 18:54
Surely, for example

translates into something like
?

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Nov 2010 23:41 Edited at: 25th Nov 2010 23:45
DBPro:


NASM:


[b]
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 26th Nov 2010 02:18
Point being, in the end all you have to perform any type of code re-iteration (loops, etc) and other branching is pretty much equivalent to a goto (JMP, if you will).
So "forgetting" all about the particular operation just because there normally is a compiler to translate more logic looking instructions isn't to be completely recommended in my book

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 26th Nov 2010 04:52 Edited at: 26th Nov 2010 04:55
Rudolpho makes a good point. Maybe it is a good idea to teach newbies about GOTO first and then explain that looping commands evolved from more complex, yet common, uses of GOTO.
This is one of the reasons I don't want GOTO to completely disappear, there may be other ways of using jumps that we haven't found yet or are too abstract to warrant a specialised command. GOTO is very powerful but it must be used wisely.


Snobbery is a privilege of the ignorant.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Nov 2010 14:52
@Rudolpho & Diggsey,
Pointing out the fact that structured language loops devolve into the equivalent of GOTO commands at the lower level completely misses the point IMO.

It's what WE code in and the structures WE use that's important, not what the compiler happens to do behind the scenes.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Nov 2010 15:28
@IanM
I wasn't trying to prove a point, merely showing what assembly actually looks like in case anyone was interested...

[b]
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 26th Nov 2010 18:36
wachoo all talking about Goto s are great i use them all the time

dont hate people who rip you off,cheat and get away with it, learn from them
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Nov 2010 23:30
lol

[b]
DeadTomGC
13
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 29th Nov 2010 04:43 Edited at: 29th Nov 2010 04:51
My internet has been out for a while, but I’m back.

Man, You guys really like arguing… Any who...

First, to all, this is mainly about c++.

Grog Grueslayer, I never got to read your post I lost that thread too, and I never intended to be rude on that other thread, and it’s not like that was the first time I saw an anti goto post or website.

Oh, and thanks to everybody for contributing toward a college paper I am writing. Don’t worry, I am not quoting paraphrasing or mentioning in any way anything somebody else wrote on this thread.

The point I was originally trying to make was that if the goto statements are commented appropriately along with the line number the goto will jump to, they can be easier to understand and trace than loops without labels.

This is because if you have enough control statements, you end up with a long line of end brackets clustered somewhere in your program. This is much messier than a mix of brackets and gotos with appropriate labels and line numbers.

Also, jumping out of one complex process and into another is far easier to do with gotos than with loops and if statements.

Diggsey, Where did you get that graph?

uuhh... yah...
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 29th Nov 2010 07:50
Quote: "Grog Grueslayer, I never got to read your post I lost that thread too, and I never intended to be rude on that other thread, and it’s not like that was the first time I saw an anti goto post or website."


Oh I didn't take offence either. I just mentioned that I didn't pick Anti-Goto Order as my signature on the fly I thought about it a long time. The acronym AGO means in the past as where GOTO should be for us. We should learn about GOTO and use it but once we learn about GOSUB and functions we need to leave GOTO in the past... hence AGO.

I personally don't use GOTO or even GOSUB anymore and only use functions but I have nothing against anybody that do use GOTO or GOSUB... it's just not my choice anymore.

Quote: "Oh, and thanks to everybody for contributing toward a college paper I am writing. Don’t worry, I am not quoting paraphrasing or mentioning in any way anything somebody else wrote on this thread."


I'm sure all of us (and I) would rather you quote us, name us, and show a link to this thread in your paper. If we were afraid to have other people see what we said we wouldn't be posting at all. I for one am proud to be the founder, president, and #1 member of The Anti-Goto Order.

Quote: "The point I was originally trying to make was that if the goto statements are commented appropriately along with the line number the goto will jump to, they can be easier to understand and trace than loops without labels."


How can that make it easier to read than a loop where you know for sure that if EXIT is seen it'll go to the end of the loop? With normal program flow you don't have to jump to a line number just to see what the program is going to do next... just look at the line after the loop to continue the program flow.

Quote: "This is because if you have enough control statements, you end up with a long line of end brackets clustered somewhere in your program. This is much messier than a mix of brackets and gotos with appropriate labels and line numbers."


Isn't this another issue? As long as the programmer indents his/her code it's easy to see the beginning and end of all loops and conditional checks. It doesn't matter if they use GOTO, GOSUB or functions... if they don't indent it's painful to look at.

Quote: "Also, jumping out of one complex process and into another is far easier to do with gotos than with loops and if statements."


It's far easier to use GOSUB or functions because it'll eventually go back to the line under the GOSUB or function call. The program doesn't have to GOTO then GOTO again to get back where it came from (usually at the start of the routine rather than where it jumped out). Why do you think IF statements are bad when you probably use them to be able to GOTO out of conditional checks?

Any code you think that absolutely has to have GOTO to work properly can be converted to not use GOTO easily.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Mar 2011 07:29
In the assembler/assembly language which I used a great deal in my earlier career, structured programming was very difficult. Then, when I had to learn DOS BASIC, it still was difficult in those early days. The main problem was that flow for both were basically the same Top-Down. An experienced programmer would at least try to keep that flow without jumping around from top to bottom and bottom to top. He would try to keep the flow moving downward. GOTO's were useful. Sometimes you had to goto a line a little ways and then go back. It wasn't until later that GOSUB was introduced.

Now-a-days there is no reason one shouldn't use structured programming. Even VB has gone to a more structured/semi-object oriented language.

As someone said "on error goto" is something very useful in VB. I use that because you will never be going back anyway. You just have to remember to put an "exit function" or "exit gosub" before the label.

As far as DBPro, Lee uses a goto twice in the FPSC source code. I don't think it is more than that. He put a warning message surrounding the "GOTO" label:

Quote: "rem GOTO LABEL (warning: not recommended but useful sometimes!)"


I used it several times when I modified the FPSC code. It was used if the player wanted to redo something. It was easier to code it that way at the time. As far as I was concerned, it didn't create spaghetti code at all; but, I could now revise it and put the reusable code into a function or GOSUB routine. I don't want to take the time, though, and this is my personal mod anyway.


Terry
Omnomer
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location: a goauld mothership
Posted: 29th Mar 2011 05:56 Edited at: 29th Mar 2011 05:58
WOW You people have been arguing I use goto with indenting in my text adventure and could have my dad(a profesional programer) look at it and he can read it easily!! It is also very handy for text adventures.

Mwahahahahahahahahahahahahaha
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Mar 2011 07:22
after having given up reading every post as they all started speaking some foreign language... I just want to finally speak as a zen master lol and say... every function....... has its function and you make use of those functions when and whenever the situation calls for it.

hope this endes this madness lol

TGC Products: Dark Game Studio–DarkCLOUDS-Enhancement Pack-3D WorldStudio-Animated Sprite Pack-FPS Creator X9 free upgraded to build-Dark Data-DarkNet-Unity-EZRotate
PrimalBeans
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location: The sewer.... hunting alligatiors.
Posted: 30th Mar 2011 10:22
I think this is language dependent. Ive used robotics languages that goto is actually helpful in organization. In c++ you have enough functionality to usually avoid goto... though at the same time ask yourself what a switch statement resembles... Goto is like the cave man with the club. Hes still human and smart just not as smart, but if you need to club a mamoth he can still do it. I think its apperent that if the functionality of goto still exists, that it still has value otherwise it would have been phased out long ago. Like said by ian i think there is a time and a place for it and you need to determine whats going to do the best job under the circumstance. This applies to all features of a programming language. The most current hip methods arnt always the best to use. You have to be able to assess the situation and then decide from your toolbag what will workt the best.

Attachments

Login to view attachments
PrimalBeans
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location: The sewer.... hunting alligatiors.
Posted: 30th Mar 2011 10:30
On that note i would like to add that most ppl like to use every new fandangled thing they learn in a programming language without really understanding what its for exactly. (I know i do) Some things are just as simply done with rudimentry programming. You gain nothing from advanced features if you just spam them and defeat thier purpose.
That said i wouldnt do the opposite and use goto for everyting either. Become comfortable programming in a language and then develop a clean style that suits you.

flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 30th Mar 2011 13:32
I have a story. Once long ago I was introduced to the magical wonders of Dbpro. Grog was there to guide my foolish questions, I remember it to this day. And as my wheels got turning, I learned of the villainous GOTO. I tapped into its corruption, thinking that the power to jump for line to line would strengthen my game. And for a week or so, it did. Progress came like strawberries in summer and I the programmer spirits smiled upon me. But alas, it was all for naught, for soon there after the GOTOs rioted in the source. Their tricky logics flummoxed my very being, and sent the project hurtling towards an unknown nether world of spaghetti madness. I never saw the source code again.

Since that dreadful fate, I have forbidden myself to be tempted by the lustful GOTO command. It is evil.

PrimalBeans
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location: The sewer.... hunting alligatiors.
Posted: 31st Mar 2011 08:22
heres some sample code to end this debate.


Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 1st Apr 2011 04:40
@ Flashing Snall:

Your message was so poetic!

Omnomer
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location: a goauld mothership
Posted: 1st Apr 2011 05:55
I still think goto has some uses.

(\/) Squirel!!!!!!!!!!!!!!!!
(0o)
''
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 1st Apr 2011 18:41
Quote: "I still think goto has some uses."


Yeah that's true... "Omnomer, goto the store to pick me up some candy.".

Really though it will stay in Darkbasic just so old code that uses GOTO (or new code with those that use GOTO) will still work properly when ran. It'll always be there to tempt people to use it.

Travis Gatlin
14
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 5th Apr 2011 02:04 Edited at: 5th Apr 2011 02:06
I find GOTO Useful, It can be used for multi-leveled games for jumping from level to level. say

The Gosub way:



My Current Project: Unbenounced to you, Puny Human!
Check out some of my work at http://travisgatlin.deviantart.com/
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Apr 2011 11:01
I generally do something like this for multi-leveled games:



Login to post a reply

Server time is: 2024-05-04 18:03:31
Your offset time is: 2024-05-04 18:03:31