Author Topic: Jump without Lbl-Goto  (Read 6150 times)

0 Members and 1 Guest are viewing this topic.

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Jump without Lbl-Goto
« Reply #15 on: October 15, 2010, 05:56:51 pm »
nah, I generally make it goto 0 first and then start at thw hile or whatever ele you wanted to start at.  ;)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Jump without Lbl-Goto
« Reply #16 on: October 15, 2010, 05:58:34 pm »
Ah right, I see :D

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Jump without Lbl-Goto
« Reply #17 on: October 15, 2010, 05:59:31 pm »
wow, I misspelled a lot of stuff.  :P

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Jump without Lbl-Goto
« Reply #18 on: October 16, 2010, 01:39:30 am »
I believe another way to use Lbl/Goto more efficiently would be to put all your sub-routines at the top of your program. Then you put your main code in a label too and put a Goto at the top that goes to that label. That way when a sub-routine is called it won't have to scan far to call the routine. It can be tricky to code that though, sometimes.

I didn't see anyone else suggest that so ya. Hopefully that makes sense.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Jump without Lbl-Goto
« Reply #19 on: October 16, 2010, 02:14:02 am »
Yeah in some old games, what I did is to put menus and other stuff that aren't related to the main engine completly at the bottom of my programs and the main engine at the top. It was much faster.

Offline shrear

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 193
  • Rating: +17/-0
    • View Profile
Re: Jump without Lbl-Goto
« Reply #20 on: October 16, 2010, 04:47:25 pm »
:Lbl 1
:stuff
:End
:While 1
:stuff
:Goto 1

I suppose you mean something like
Lbl a
stuff
While something
stuff
EndWhile
stuff
If something
Goto a

Just say yes or no because I honestly don't understand what you mean else.
« Last Edit: October 16, 2010, 04:48:17 pm by shrear »

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Jump without Lbl-Goto
« Reply #21 on: October 16, 2010, 04:50:34 pm »
no, theres no endwhile, the goto makes it jump to the lbl, and then when it reaches the "End", it thinks the End belongs to the While, because the TIOS stores a bit of memory to look for the end.  it never sees an End til the end after the lbl, so it thinks that end belongs with the While, so it jumps back to where the While is. and jumping back from a loop is really fast.  ;)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline shrear

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 193
  • Rating: +17/-0
    • View Profile
Re: Jump without Lbl-Goto
« Reply #22 on: October 16, 2010, 05:10:00 pm »
Ah alright
thx for explaining