Python Forum
Is there a goto like there is in BASIC?
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a goto like there is in BASIC?
#15
(Apr-21-2017, 04:46 AM)Luke_Drillbrain Wrote: One was for when I was still in the early stages of creating a loop and wanted to avoid an endless loop and a crash.  I could set an integer to track the number of times something looped, and then set a place outside the loop named "JumpOut".  If the integer got higher than 1,000 (or some other value), "GoTo JumpOut" would be triggered and the loop would end.  

I don't see how that'd be better than just writing a function and using return to get out of the function.  It's the same thing, except with the function it's easier to see what your actual intention is.
Reply


Messages In This Thread
RE: Is there a goto like there is in BASIC? - by nilamo - Apr-21-2017, 03:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  goto jmabrito 34 10,785 Feb-18-2021, 09:55 PM
Last Post: jmabrito
  How to make input goto a different line mxl671 2 2,534 Feb-04-2020, 07:12 PM
Last Post: Marbelous
  goto problem Skaperen 1 2,813 Jan-27-2018, 01:11 PM
Last Post: stranac
  Go up script/menu(a goto command) foxtreat 7 8,380 Apr-24-2017, 05:58 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020