Well, if you want to 'save' a string within a program, all you have to do is declare and assign a string variable. Then, as long as you don't modify the variable, you can reference it throughout your program's runtime. You can declare a string by appending a dollar sign to a variable's identifier, like this:
NAME$ = "TEXT GOES HERE"
If you want to let the player input the string's content, you can use the INPUT command. It follows this syntax...
INPUT <Guiding text>,<Variable to assign to>
So you could do something like...
INPUT "Enter your name: ",NAME$
Now, if you want to save a string for future use (to load it back up again after the program stops), you need to use the SAVE command. It requires more explanation, so please reply if you want to know about this one.
Sorry for the late reply. If you want to save a string, you simply need a string and the SAVE command. You can save a text file with this syntax...
SAVE "TXT:<Filename>",<String$>
For example...
NAME$="EXAMPLE"
SAVE "TXT:SAVEDATA",NAME$
Do note that a dialog will appear to the user in order to save, meaning that the user may cancel saving.
Loading it is very simple as well. Similarly, you'd need a string variable and the LOAD command. You can use LOAD with either of these syntax...
<String$>=LOAD("TXT:<Filename>",FALSE)
LOAD "TXT:<Filename>",FALSE OUT <String$>
It is suggested that you call CHKFILE before you try to load something. This is so that you prevent loading a file that doesn't exist, since it would throw an error.
You use CHKFILE to check if the file exists. It follows this syntax...
<Boolean>=CHKFILE("<Filetype:><Filename>")
The function will return either true or false, so it's suggested you place it in a conditional, like this...
IF CHKFILE("TXT:SAVEDATA") THEN
NAME$=LOAD("TXT:SAVEDATA",FALSE)
ENDIF
It's an easy custom function. You just need to remember that a string is really just an array of individual characters, so you can iterate over it. I'll give you an example with text (TX$), a wait amount (WT), and even a sound (BP) as a parameter.
DEF TYPE TX$,WT,BP
FOR I=0 TO LEN(TX$)-1
?TX$[I];
BEEP BP
WAIT WT
NEXT
END
You can then call it like this...
TYPE "SMILEBASIC",10,9