Text Adventures Archives

How to split a long string into separate words in Commodore BASIC

Here’s a quick word splitter routine for CBM BASIC. It takes phrase and “explodes” all words into an array, removing spaces. Feel free to adopt it for your own needs. 10 rem word splitter 20 rem splits a long phrase into words at a space 30 input “tell me something”;a$ 40 rem clear current array … Read more