Calculator Community > Axe

[UPDATE] Speed Order Program

(1/3) > >>

Raylin:
This is the current program for the ARMY speed order.


--- Code: ---:.SPDORDER
:Disp "Loading...
:"vARMYOrdr→Str1
:GetCalc(Str1)→θ
:If θ=0
:GetCalc(Str1,100)→θ
:For(X,0,99
:rand→{θ+X
:End
:End
:conj(θ,L1,100
:1→A
:While A
:0→A
:For(X,0,99
:If {L1+X}<{L1+X+1}
:expr(L1+X,L1+X+1,1
:1→A
:End
:End
:End
:1→A
:Fill 0→{L2},100
:For(X,0,99
:{θ+X}→Z
:For(Y,0,99
:If Z={L1+Y}
:(Y+1)→{L2+X}
:End
:End
:End
:For(X,0,99
:Disp {L2+X}►Dec,i
:Repeat getKey
:End
:End
--- End code ---

If anyone has any optimizations for this, that would be nice.
And, if anyone can patch up the little problem that occurs with duplicates (The problem is that the same value is assigned to duplicates.), that would be nice as well.

ztrumpet:
Let's see, I see one little thing:
If θ=0
could be
!If θ

I'm not the best at optimizing for Axe, so I wouldn't doubt if more optimizations are out there.  Good luck! ;D

DJ Omnimaga:
I'm not sure if I understand "Fill 0→{L2},100"

Isn't it Fill(, not Fill?

Raylin:
That's weird.
I copied this from SourceCoder 2 over at Cemetech.

DJ Omnimaga:
Oh, I think SC2 had some issues with commands. I should maybe report them to KermMartian unless it was already reported before. Horizontal changes to Horizontal(

I can't find optimizations, though

Navigation

[0] Message Index

[#] Next page

Go to full version