Advertisement
Guest User

prgmB5INPUT (Commented)

a guest
Feb 4th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. prgmB5INPUT (Stand-alone) (Commented)
  2. WRITTEN BY: Toothless the Night Fury
  3. LANGUAGE: TI-BASIC
  4. TOTAL BYTES: 538 (Not including comments)
  5. VARS USED: A,B,K,Str0,Str1
  6.  
  7. ///Sets up Graph Screen and initalizes variables.
  8. :0->Xmin
  9. :94->Xmax
  10. :0->Ymin
  11. :62->Ymax
  12. :" ->Str0 (93 spaces)
  13. :Horizontal 6
  14. :Text(0,83,"abc
  15. :">->Str1
  16. :Text(57,0,Ans
  17. :DelVar A
  18.  
  19. :While 1
  20.  
  21. ///Main getKey loop + Generates blinking cursor
  22. :Repeat 34<Kmin(K!={44,45,95,94not(A //Repeats until letter/number key is hit.
  23. :B+1->B
  24. :Text(57,0,Str1+sub("_ ",1+(Ans<18),3 //Displays underline or three spaces, creating a blink.
  25. :Ans(Ans<36->B //Resets B to 0 if B is greater than 36.
  26. :getKey->K
  27. :If not(Ans
  28. :End
  29.  
  30. //Features block
  31. :If Ans=105 //Ends program if Enter is pressed.
  32. :Return
  33.  
  34. /Clears the entire line or deletes a single letter depending on the keypress.
  35. :If max(Ans={23,45
  36. :Then
  37. :DelVar B
  38. :Ans=23
  39. :sub(">"+Str1,1+Ans,1+Ans(length(Str1)-2->Str1
  40. :Text(57,0,Ans+Str0
  41. :End
  42.  
  43. /ALPHA toggle and switches between letters and numbers.
  44. :If K=31
  45. :Then
  46. :not(A->A
  47. :Text(0,83,sub("abc123",1+3Ans,3
  48. :End
  49. :End
  50.  
  51. ///Deletes any leftover line and resets B.
  52. :DelVar B
  53. :Text(57,0,Str1+"
  54. :K
  55.  
  56. //Stores letter or number to Ans
  57. :sub("abc defghijklmnopqrstuvwxyz .-",Ans-20-5int(.1Ans),1
  58. :If 71<AKmin(K!={45,75,81,85,104
  59. :sub("789 456 123 0.",K-36-5int(.1K),1
  60.  
  61. :Str1+Ans->Str1
  62. :Text(57,0,Ans
  63. :End
  64. :End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement