QUOTE (CDI @ 18 January 2006, 6:17) |
@tenniskid493 - No, not yet... he needs to finisg an RPG (or get close) before we percribe xLIB :D![]() |
CODE |
ec1Repeat K<>0 Getkey->K End c2 |
CODE |
ec1Repeat getkey Endc2 |
CODE |
ec1Repeat Ans getkey->K Endc2 |
QUOTE (g28401) |
playin Rakion, |
QUOTE (Spellshaper @ Mar 13 2006, 10:32) | ||||||||||
nice to see u back :thumb:![]() [off topic] QuoteBegin-g28401+-->
kewl... will u gimme your char name for my buddy list? ^^ (Currently I Post by: DJ Omnimaga on March 17, 2006, 10:34:00 am ![]() Post by: g28401 on March 17, 2006, 04:11:00 pm I am using the Lbl and Goto commands I am using the Stop command Archiving variables Getkeys instead of Pauses. Post by: tenniskid493 on March 17, 2006, 05:39:00 pm
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
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. Post by: g28401 on March 18, 2006, 02:04:00 pm Text Decoders? What's This? How can you use one subroutine for many functions? Many more, but can't think of them all ;O Post by: Spellshaper on March 19, 2006, 01:27:00 am 2. For example: Write your function inside an if-construction like If var= something then do stuff End and repeat this for every function. That way, u have one function library to call upon instead of many lil prmgs. Post by: g28401 on March 19, 2006, 11:22:00 am ![]() Post by: Spellshaper on March 19, 2006, 11:37:00 am 2. Instead of writing a function every time it is needed, put them into 1 prgm example: PROGRAM:LIB :If A=1 :then :For(A,0,100 /this just slows down the prgm... :End :End :If A=2 :then :12 :Asm(prgmCODEX /this shuts down the calc until ON is pressed, needs CODEX :Repeat getkey :End :End to call upon function1, do :1->A :prgmLIB for function2 :2->A :prgmLIB |