Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to use a command in a sub to goto a label in
#1
the main module? I am trying to make a gosub or goto command that goes to a label in the maind module.... Is this possible to do?
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#2
No.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Okay, Thanks Lebron!
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#4
Nath: Yer name Lebron?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#5
This is the first notice I have of it.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#6
what?

however if u have a sub, you could do something like this.

Code:
print "a"                       'main sub code
dosomthing tag           'goto sub dosomething, passing variable tag
if tag = 1 then gosub dosomethingelse    'after return from sub gosub other code
end                           'end of program

dosomethingelse:      'gosub in main sub
print "b"                     'code in gosub
dosomething 1           'go back to dosomething sub
return                         'returns to gosub, i.e. end

sub dosomething (tag)          'dosomething sub with variable tag
if tag = 0 then                       'if first time ran run all code
  print "c"
  tag = 1                                'not first time run
  exit sub                               'return to main sub
end if                                    

tag = 0                                  'run the rest of the sub after you have returned and come back
print "d"

end sub
eminiscing about trapezoids in conjunction with stratospherical parabolas:

No questions asked.

www.stickskate.com
Reply
#7
I appreciate it Darnell. :king:
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#8
what?
eminiscing about trapezoids in conjunction with stratospherical parabolas:

No questions asked.

www.stickskate.com
Reply
#9
what?
eminiscing about trapezoids in conjunction with stratospherical parabolas:

No questions asked.

www.stickskate.com
Reply
#10
DOUBLE POST'D [/b]
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)