LESSON 5 OF 13
STRINGS
Cutting words up and sticking them together.
LEN(W$) tells you how many characters are in a string. LEFT$(W$,3) gives the first three, RIGHT$(W$,2) the last two, and MID$(W$,4,1) one character starting at position 4. Positions count from 1, not 0.
Plus joins strings: "YO"+"MP" is "YOMP". Building a string one character at a time inside a loop is the classic way to reverse a word.
Every character has a code. ASC("A") is 65 and CHR$(65) is "A". The codes from 193 to 218 are the same letters in the graphics set, and 147, 5, 158 and friends are the control codes you have already met.
Type with the keyboard under the screen, or tap the blue screen to use your phone's own keyboard. While a program runs, keys go to INPUT and GET. When it says READY., type a line and press RETURN to run it straight away.