If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Moderators: Pete , Mods
Guest
Post
by Guest » Sun May 08, 2005 7:41 am
e.g.:
Code: Select all
SUB Intro
PRINT "This is the intro sub."
ChangeColor:
Color 2
PRINT "Colour changed"
Color 15
PRINT "OK."
GOTO ChangeColor
END SUB
If I use somthing like this, the program says it can't find 'ChangeColor:'. Is there a way to get around this?
grtz
SebMcClouth
Kyle
Veteran
Posts: 107 Joined: Thu Apr 14, 2005 2:41 pm
Post
by Kyle » Sun May 08, 2005 8:48 am
Use line numbers? See if they work.
Z!re
Veteran
Posts: 887 Joined: Wed Aug 04, 2004 11:15 am
Post
by Z!re » Sun May 08, 2005 9:05 am
Dont use GOTO
Use DO, LOOP instead.
I have left this dump.
mundofr
Coder
Posts: 34 Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:
Post
by mundofr » Sun May 08, 2005 1:56 pm
well if that is the whole program u should use a loop but i doubt it, so then try to use line numbers as sum1 said. if that doesnt work then i dont kno wats wront with it
Michael Calkins
Veteran
Posts: 76 Joined: Tue Apr 05, 2005 8:40 pm
Location: Floresville, Texas
Contact:
Post
by Michael Calkins » Mon May 09, 2005 11:52 am
The
GOTO ChangeColor
seemed to work for me. I don't know why it wouldn't work for you. You can use GOSUB also.
Regards,
Michael
Bring on the Maulotaurs! oops...
I like to slay Disciples of D'Sparil...
Z!re
Veteran
Posts: 887 Joined: Wed Aug 04, 2004 11:15 am
Post
by Z!re » Mon May 09, 2005 12:43 pm
It doesent work in FB
It works in QB45 and QB71
I have left this dump.