Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-03-2008, 03:49 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by cbkbud View Post
goto would be a complete nightmare when trying to read code.

Think about it; in languages such as BASIC they have it, but that is not object oriented, and does not have functions.

Think about this ...

function foo() is called. It goes to CAT which is in function bob(), which goes to DOG which is in function moo() ... then eventually does it go back to the original function foo()? Or does it keep advancing?

And THEN, what happens if you GOTO a function, and then the function ends? Your whole script has stopped.

That's not the way GS2 is supposed to work. After you call one function, it goes back to the function it was in before when it's completed. This is how it should work. goto would completely screw this up.

In Java, goto is actually a reserved variable name (you cannot name a function or variable it). I guess they REALLY don't like it.

If you need to quit a loop, return is your best option, or to use a variable I suppose.

Simply structure your code better is my suggestion.
C++ is OOP and they have it :P
__________________
Reply With Quote
  #2  
Old 02-03-2008, 09:35 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by projectigi View Post
C++ is OOP and they have it :P
Much like saying cocaine abuse is around us. Doesn't necessarily mean we should use it.

I generally prefer to steer clear from gotos. Functions are much better to use.
Reply With Quote
  #3  
Old 02-03-2008, 10:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Codein View Post
Much like saying cocaine abuse is around us. Doesn't necessarily mean we should use it.
It doesn't? That guy in the white Sedan was lying to me!
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.