TI-BASIC:Typewriter
From Learn @ Cemetech
Jump to navigationJump to search
Routine Summary
Makes text appear letter by letter
Inputs
Str1 - Text to be displayed. A,B - Row and colum to display text.
Outputs
Variables Used
A, B, T, Str1
Calculator Compatibility
All TI calculators
Download
No download provided.
:For(T,1,length(Str1 :Text(A,B,sub(Str1,1,T :rand(5 :End
We use a For( loop over the length of the string to go through the string letter by letter. In order to make the spacing come out right, instead of figuring out the right coordinate to display each character at, we display the first T characters of the string starting from the beginning. The rand(5) provides a split-second delay to achieve the typewriter effect.
For multiple lines with the typewriter effect, you can combine this routine with the one to Wordwrap_Text.
Error Conditions
- ERR:DOMAIN is thrown if the string doesn't fit entirely on the screen.