0 Members and 5 Guests are viewing this topic.
.TEST[002442DBE7BD2400->Pic1[0000183C3C240000->Pic2DiagnosticOffClrDrawDrawInv 44->X54->Y0->B->E->TRepeat getKey(15)sub(DDispGraphsub(DIf getKey(2) and (X!=1X-1->XEndIf getKey(3) and (X!=87X+1->XEndIf getKey(4) and (Y!=1Y-1->YEndIf getKey(1) and (Y!=55Y+1->YEndIf getKey(54) and (T=0B+1->B*3+L1->I0->{I-2}X->{I-1}Y->{I}15->TEndT=0+T-1->TFor(I,0,BI*3+L1->J{J-2}-1+{J}->{J}If {J}=57 or ({J}=0B*3+L1->KCopy(J,K,3)^^rB-1->BEndEndEndClrDrawClrHomeReturnLbl DPt-Change(X,Y,Pic1For(I,0,BPt-Change({I*3+L1-1},{I*3+L1},Pic2End
For(I,1,BI*3+L1->J{J-2}-1+{J}->{J}If {J}=57 or ({J}=0B*3+L1->KCopy(K,J,3)^^rB-1->BI-1->IEndEnd
Also note that Axe is not Basic. The main difference being that Axe is compiled while Basic is not. This means that "forgetting" parentheses in Basic saves space in the executable and in the source (since they are the same), but in Axe, that doesn't save anything for the executable. And saving space in the source only is not useful except if you have a 83+ non-SE. Otherwise, I'd advise you to close your parentheses to avoid mistakes such as writing A+(C=1→A which you understand as A+(C=1)→A but which the parser understands as A+(C=1→A).
Quote from: Hayleia on August 01, 2013, 03:27:35 pmAlso note that Axe is not Basic. The main difference being that Axe is compiled while Basic is not. This means that "forgetting" parentheses in Basic saves space in the executable and in the source (since they are the same), but in Axe, that doesn't save anything for the executable. And saving space in the source only is not useful except if you have a 83+ non-SE. Otherwise, I'd advise you to close your parentheses to avoid mistakes such as writing A+(C=1→A which you understand as A+(C=1)→A but which the parser understands as A+(C=1→A).Ah yes. I've been coding with ti-basic for a while and its sorta confusing because my brain is still thinking on how I'd do a program in ti-basic when here things like speed dont matter as much.
Yea I came across another thing I wanted to ask about here, With some code like:0->{I-2}->{I-3} The {I-3} dosent work for some reason when something like 0->A->B would. Is there any way to do that with the value of a pointer thing?
Select(foo,->{bar1})Select(,->{bar2})Select(,->{bar3})
foo->{bar1}foo->{bar2}foo->{bar3}
Quote from: LemonDrop on August 01, 2013, 04:23:19 pmQuote from: Hayleia on August 01, 2013, 03:27:35 pmAlso note that Axe is not Basic. The main difference being that Axe is compiled while Basic is not. This means that "forgetting" parentheses in Basic saves space in the executable and in the source (since they are the same), but in Axe, that doesn't save anything for the executable. And saving space in the source only is not useful except if you have a 83+ non-SE. Otherwise, I'd advise you to close your parentheses to avoid mistakes such as writing A+(C=1→A which you understand as A+(C=1)→A but which the parser understands as A+(C=1→A).Ah yes. I've been coding with ti-basic for a while and its sorta confusing because my brain is still thinking on how I'd do a program in ti-basic when here things like speed dont matter as much.Even when you code in axe, it's bets to try limit the size of the executable as much as possible and making it as fast and optimized as possible. Axe is a great and powerfull language, but the calc's hardware is very limited. When you have to handle a lot of objects at once, that work really pays off.
Sorry for asking a lot of questions here but I think its better than making new threads. So I was wondering about a few things:1. Are axe programs in the Full 15mhz mode by default2. Is using things like rotC, flipH and flipV instead of making sprites for different angles better (speed/space wise)3. I heard that separating if statements (If A:If B) is faster than combining them (If A and B), is this true? Which one uses less space alsoand finally4. Whats the risk of using L3 for data, or is it safer to just use a pseudo list (L2+250 being the start of it) if you know the data in L2 wont extend that faredit:Oh yea does sound with the freq command play synchronously (meaning if its told to play for 1 second will it wait 1 second to go to the next command or does it play as stuff is happening)(also this is what I have so far for my game thing, ignore the completely terrible explosion sprites and stuff)
On line 92, should If J>6 be If {J-2}>6 instead?
-code removed because copyprotection-