QuoteBegin-g28401+Mar 17 2006, 21:11-->
QUOTE (g28401 @ Mar 17 2006, 21:11) |
I am using the Lbl and Goto commands
|
99% of the time, lbls and Gotos can be avoided. The only time they absolutely can't be avoided is if you are using the Menu( command. The reason they are bad is because they can cause memory leaks. This means that, whenever you enter a loop, the calculator stores some data telling it to look for an end. When it reaches the end of the loop, this information is opened up again. However, if you break up a loop with a Goto so that it never reaches the end, that memory space is wasted, thus causing a memory leak. This will lead to an annoying Err:Memory message that will cause you to have to quit out in the middle of the game. Gotos and Lbls can always be replaced with If:Then statments. Instead of saying:
c1
-->
ec2
you could say
c1
-->
CODE |
ec1If A=5 Then (Put what was at Lbl 99 here) Endc2 |
ec2
If you are performing the same function many times in different spots throughout the program, then you might want to make sub-programs. Then you would do
c1
-->
ec2
Where you put whatever was at Lbl 99 into prgm???
Hope this helped you out. If you still need more help or have any questions, feel free to ask. Also, if you have a specific question about your code, you could post a portion of your code and we could have a look at it and let you know the best way to go about what you want to accomplish.