Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prgmB5INPUT (Stand-alone) (Commented)
- WRITTEN BY: Toothless the Night Fury
- LANGUAGE: TI-BASIC
- TOTAL BYTES: 538 (Not including comments)
- VARS USED: A,B,K,Str0,Str1
- ///Sets up Graph Screen and initalizes variables.
- :0->Xmin
- :94->Xmax
- :0->Ymin
- :62->Ymax
- :" ->Str0 (93 spaces)
- :Horizontal 6
- :Text(0,83,"abc
- :">->Str1
- :Text(57,0,Ans
- :DelVar A
- :While 1
- ///Main getKey loop + Generates blinking cursor
- :Repeat 34<Kmin(K!={44,45,95,94not(A //Repeats until letter/number key is hit.
- :B+1->B
- :Text(57,0,Str1+sub("_ ",1+(Ans<18),3 //Displays underline or three spaces, creating a blink.
- :Ans(Ans<36->B //Resets B to 0 if B is greater than 36.
- :getKey->K
- :If not(Ans
- :End
- //Features block
- :If Ans=105 //Ends program if Enter is pressed.
- :Return
- /Clears the entire line or deletes a single letter depending on the keypress.
- :If max(Ans={23,45
- :Then
- :DelVar B
- :Ans=23
- :sub(">"+Str1,1+Ans,1+Ans(length(Str1)-2->Str1
- :Text(57,0,Ans+Str0
- :End
- /ALPHA toggle and switches between letters and numbers.
- :If K=31
- :Then
- :not(A->A
- :Text(0,83,sub("abc123",1+3Ans,3
- :End
- :End
- ///Deletes any leftover line and resets B.
- :DelVar B
- :Text(57,0,Str1+"
- :K
- //Stores letter or number to Ans
- :sub("abc defghijklmnopqrstuvwxyz .-",Ans-20-5int(.1Ans),1
- :If 71<AKmin(K!={45,75,81,85,104
- :sub("789 456 123 0.",K-36-5int(.1K),1
- :Str1+Ans->Str1
- :Text(57,0,Ans
- :End
- :End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement