Jump to content
  • Advertisement
Sign in to follow this  
BOOGIEMAN

goto command

This topic is 4755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wonder if any scripting language supports goto command ? I looked in Python and Ruby and they doesn't. Are there any that does ?

Share this post


Link to post
Share on other sites
Advertisement
Many do (BASIC comes to mind)... but why?

You can do anything you can in the other languages without using goto. That's why it's not there, because they don't need it.

Share this post


Link to post
Share on other sites
basic and C do.

Although maybe you should be asking yourself why you need to use goto.

ace

Share this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
basic and C do.

Although maybe you should be asking yourself why you need to use goto.

ace


Because I'm an amateur programmer.
I know about C, C++, C# ... supports goto, but I didn't know that none of those hundereds scripting languages supports it

Share this post


Link to post
Share on other sites
Quote:
Original post by BOOGIEMAN
Quote:
Original post by ace_lovegrove
basic and C do.

Although maybe you should be asking yourself why you need to use goto.

ace


Because I'm an amateur programmer.


lol, then you definitely shouldnt be using it...

Its actually an interesting question though. It just dawned on me that iv no idea, since iv never had to use a goto before in my life (except some error handling in C)

Share this post


Link to post
Share on other sites
Quote:
Original post by BOOGIEMAN
Because I'm an amateur programmer.


That's not a reason to use goto statements.

Quote:
I know about C, C++, C# ... supports goto, but I didn't know that none of those hundereds scripting languages supports it


Most people will tell you a goto is rarely useful. The only place I can remember seeing gotos is Visual Basic error handling code, and it was basically a hack to make up for VB's lack of exceptions (although this may have changed in newer versions).

You can probably do the same thing you want with gotos by using some other language feature.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!