milkshake333 Posted August 4, 2010 Share Posted August 4, 2010 Hi, I don't know if it's the right section, but I think it's the right one. Is it possible to label a bunch of code and then go to it with the function goto label. Like: (I know this code isn't anything, just for an example ) A: if a == b then a = a + b end and then later on in your script if a == b then goto A end So my question is: Is this possible, if yes, how? Greetz, MILKSHAKE. Link to comment
x86 Posted August 4, 2010 Share Posted August 4, 2010 What's wrong with this? function FuncA() if a == b then a = a + b end end if a == b then FuncA() end Link to comment
milkshake333 Posted August 4, 2010 Author Share Posted August 4, 2010 Hmm, you actually brought me on an idea . First I thought that wasn't possible, but after some more thinking I think I can make it that way. Ty Link to comment
50p Posted August 4, 2010 Share Posted August 4, 2010 Hmm, you actually brought me on an idea . First I thought that wasn't possible, but after some more thinking I think I can make it that way. Ty This is what you should do even in languages which support goto. Link to comment
dzek (varez) Posted August 4, 2010 Share Posted August 4, 2010 and tbh - try avoid programming based on "goto" idea - it's nothing good Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now