Computer Science Canada Goto command or coding |
Author: | chalcids [ Wed Nov 23, 2011 9:02 am ] |
Post subject: | Goto command or coding |
I need coding or a command that I could use to go to a line or go to a variable! Please it I need some code or logic. |
Author: | Zren [ Wed Nov 23, 2011 11:35 am ] |
Post subject: | RE:Goto command or coding |
What are you trying to do? Why do you need to go to a specific line? Would a loop not solve this? What about calling specific lines in a procedure? |
Author: | Tony [ Wed Nov 23, 2011 1:45 pm ] |
Post subject: | RE:Goto command or coding |
Nope. You didn't "want" a goto since at least 1968[1] and you didn't "need" it after 1973[1] So if you don't want a goto... and don't need to use it... what exactly are you asking? [1] http://dl.acm.org/citation.cfm?id=362947 [2] http://dl.acm.org/citation.cfm?id=362337 |
Author: | chalcids [ Wed Nov 30, 2011 11:03 am ] |
Post subject: | Re: Goto command or coding |
I need it because in my program i need it to go from line 22 to line 609 because i don't want to rewrite the same code again besides the goto command is not bad for some it might fro others it is a life saver |
Author: | Dragon20942 [ Wed Nov 30, 2011 1:07 pm ] | ||
Post subject: | RE:Goto command or coding | ||
Simply use a loop and a condition if you want to avoid rewriting code.
That way, you dont need to write "thing += 1" 5 times before presenting the condition. |
Author: | [Gandalf] [ Wed Nov 30, 2011 9:47 pm ] |
Post subject: | RE:Goto command or coding |
Or better yet, it sounds like you want to split your code up into procedures, which are like gotos but better! |
Author: | Amarylis [ Wed Nov 30, 2011 10:07 pm ] | ||
Post subject: | Re: Goto command or coding | ||
You sound like you'd need a procedure more so than you would a loop
|
Author: | chalcids [ Thu Dec 01, 2011 5:27 pm ] |
Post subject: | Re: Goto command or coding |
yeah thats what i need thanks |