Posted 31 August 2008 - 10:37 AM
Yesterday I made an account on this forum because I had a problem... After some thinking I solved it myself... Now I've got a new problem and I hope someone can help me.
What I want to do is something like this:
Locate 1,1,"This is label 1"
The problem is that you can also use 'A' as a label name. So you'd get an Go Error when you'd start this code.
Now what you could do is make a long piece a code which will check if the variable A is 1,2,3... or 9 and then go to that label, but it has to be easier... Does someone know how??
PS is there somewhere a switch statement in the program functions?
Posted 01 September 2008 - 09:56 PM
According to your other thread, you have solved this problem, right? If so, you may want to post your solution here so others who are curious can learn also.
Posted 02 September 2008 - 05:40 AM
Then Goto 1
Else If A=2
Then Goto 2
Else If A=3
Then Goto 3
But there has to be a better way...
Maybe I can store the number somewhere else, and then recall it ...
I'll keep trying, when I have finished it I'll post the answer, but for now on it's just a log piece a code...
Posted 08 September 2008 - 02:43 PM
while 1 //main while a = 1 ... whileend while a = 2 ... whileend a = 1 whileend //to main
I don't know exactly what you want to do. But I like to avoid goto and lbls as much as possible because they confuse the heck outa me.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users