What do you think of this code?

```
:ClrDraw
:" →Str1:1→A
:Repeat K=21 or K=105
:Text(29,0,Str1,"‾
:Repeat max(K={105,21,23,31,45,102}) or A(K>40 and K<95) or not(A)(max(K={103,104,92,93,94,82,83,84,72,73,74
:getKey→K
:End
:If K=31:not(A→A
:If K=31:Text(0,71,sub("NUMBLETT",4A+1,4),"ER
:If K=45 or (K=23 and 1=length(Str1:" →Str1
:If K=23 and 1≠length(Str1:sub(Str1,1,length(Str1)-1→Str1
:If K=23:Text(29,0,Str1,"‾
:If A:Then
:If K=44:DelVar K
:If K=102:44→K
:Else
:If K>102 and K≠105:K-41→K
:End
:K
:If Anot(max(K={105,21,23,31,45,0:Str1+sub("ABC DEFGHIJKLMNOPQRSTUVWXYZθ",Ans-20-5int(.1Ans),1→Str1
:If not(A)not(max(K={105,21,23,31,45,0:Str1+sub("0123456789.‾",27-3int(.1Ans)+10fPart(.1Ans)+2(Ans=102),1→Str1
:End
:If length(Str1)>1 and " "=sub(Str1,1,1:sub(Str1,2,length(Str1)-1→Str1
```

This is my personally rewritten version of the currently displayed number functionality. I just found the other one too long, complex, and slow (in terms of how quick it processes input). The sacrifice of using this code instead, however, is that there is no flashing cursor - just a simple ‾ (negative) symbol. This code also includes the capacity to use decimal points and the negative symbol in number mode.

What do you guys think of this code? Should it replace the current one?

*Cheers ~ James Kanjo*

*EDIT: I changed the procedure to use Harrierfalcon's formula for converting keypresses to numbers. This is because Harrierfalcon's formula is superior to my own by one byte, and is thus a better example of TI-Basic coding. You will notice, however, that there is no change in the program size, because the byte lost from Harrierfalcon's formula is regained by my change of K>94 to K>102. I also had a useless X variable initiated*

λ *James Kanjo*

_{Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript}