0 Members and 1 Guest are viewing this topic.
Output(8,1,"< MODE IS QUIT >
Also, if you want an optimisation trick, you can leave off the ending quote. Also, Disp commands can be on the same line. So:Code: [Select]Disp "HELLO"can be optimised to:Code: [Select]Disp "HELLO
Disp "HELLO"
Disp "HELLO
And this:Code: [Select]Disp "HELLO"Disp "WHAT IS"Disp "YOUR NAME?"Can be:Code: [Select]Disp "HELLO","WHAT IS","YOUR NAME?
Disp "HELLO"Disp "WHAT IS"Disp "YOUR NAME?"
Disp "HELLO","WHAT IS","YOUR NAME?
Some more optimizations:2*A can be 2A (in the gambling part, right after the first "You Won" message)Similarly for the other cases (3*A can be 3A, 4*C can be 4C, etc.)After the lineCode: [Select]Output(8,1,"< MODE IS QUIT >there is B+(K+26 and ... 0The ending parenthesis can be omitted.Before the message, "BETA TESTER!", the If statementIf LRNDM(1)=1can be:If LRNDM(1The same applies to all similar cases.
Right after Lbl 3, 0 -> B can be DelVar B.A little after the "All codes unlocked" message,Repeat LRND(F+1)=0can beRepeat not(LRND(F+1
In general, closing parentheses and multiplication symbols should be omitted.Also, if there is a conditional (If, While, etc.) that requires an expression equal to 1, the =1 part can be omitted. So,If L=1would becomeIf L
Quote from: program4 on February 03, 2011, 07:12:40 pmIn general, closing parentheses and multiplication symbols should be omitted.Also, if there is a conditional (If, While, etc.) that requires an expression equal to 1, the =1 part can be omitted. So,If L=1would becomeIf Lnow your saying it wrong.If L/=0(does not equal)would becomeIf Lbecause "If L" returns 1 if the variable existsi'll wlak through my prog today and see what i can do with your tips
Quote from: ferox on February 04, 2011, 02:22:01 amQuote from: program4 on February 03, 2011, 07:12:40 pmIn general, closing parentheses and multiplication symbols should be omitted.Also, if there is a conditional (If, While, etc.) that requires an expression equal to 1, the =1 part can be omitted. So,If L=1would becomeIf Lnow your saying it wrong.If L/=0(does not equal)would becomeIf Lbecause "If L" returns 1 if the variable existsi'll wlak through my prog today and see what i can do with your tips Well L=1 is basically a subset of L /=0 (a special case), but you're right.If the only possible values of L are 1 or 0, then you can use If L instead of If L=1. However, if L can be 0, 1, or 2, you would have to useIf L=0(code)If L=1(code)If L=2(code)
btw pity L1(1=X doesn't work
Quote from: ferox on February 07, 2011, 01:42:37 ambtw pity L1(1=X doesn't workTry X=L1(1 instead, maybe?
L1(1)=X can also be used, but it's one byte larger.