0 Members and 1 Guest are viewing this topic.

Really, that's all? Then why do Celtic III and xLib mess with Mirage so much?

Excellent routine SirCmpwn!

:.Input:0→F→B:Repeat F:0→K:Repeat K:Output(0,{E844B},'?'►Frac:getKey→K=9→F:End:K-1/10→A:4-A→A:If A=1:K^10-4*3+A→A:End:If A=2:K^10-6*3+A→A:End:If A=3:K-1^10-7*3+A→A:End:If K=33:0→A:End:If K≠9:B*10+A→B→A:sub(A):End:End:Return

:Lbl A:[000000→Pic99:A→{Pic99}r:If {Pic99}r>9:1→{Pic99+2:End:If {Pic99}r>99:2→{Pic99+2:End:If {Pic99}r>999:3→{Pic99+2:End:If {Pic99}r>9999:4→{Pic99+2:End:For(A,0,{Pic99+2:Output(1+{Pic99+2}-A,{E844B},{Pic99}r^10+48►Frac:{Pic99}r/10→{Pic99}r:End

Ok, I made a couple of routines for anyone who wants them, the first one is like TI-Basic's input command, the second one displays a number without the spaces.Input:Code: [Select]:.Input:0→F→B:Repeat F:0→K:Repeat K:Output(0,{E844B},'?'►Frac:getKey→K=9→F:End:K-1/10→A:4-A→A:If A=1:K^10-4*3+A→A:End:If A=2:K^10-6*3+A→A:End:If A=3:K-1^10-7*3+A→A:End:If K=33:0→A:End:If K≠9:B*10+A→B→A:sub(A):End:End:ReturnThis is the second part, it is used in the Input routine.Code: [Select]:Lbl A:[000000→Pic99:A→{Pic99}r:If {Pic99}r>9:1→{Pic99+2:End:If {Pic99}r>99:2→{Pic99+2:End:If {Pic99}r>999:3→{Pic99+2:End:If {Pic99}r>9999:4→{Pic99+2:End:For(A,0,{Pic99+2:Output(1+{Pic99+2}-A,{E844B},{Pic99}r^10+48►Frac:{Pic99}r/10→{Pic99}r:End

HoMM: [==--------] Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :PtiDE: [----------] Explored and understood the main part of the code: just started writing a Tokenizer.