Page 1 of 1

LineNames in SUB

Posted: Sun May 08, 2005 7:41 am
by Guest
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

Posted: Sun May 08, 2005 8:48 am
by Kyle
Use line numbers? See if they work.

Posted: Sun May 08, 2005 9:05 am
by Z!re
Dont use GOTO

Use DO, LOOP instead.

Posted: Sun May 08, 2005 1:56 pm
by mundofr
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 :D

Posted: Mon May 09, 2005 11:52 am
by Michael Calkins
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

Posted: Mon May 09, 2005 12:43 pm
by Z!re
It doesent work in FB

It works in QB45 and QB71