Try this… TS 2068

Authors

Publication

Date

Pages

BASIC Terms

I ran into something I thought was strange. Try this:

10 LET a$="sample string"
20 SAVE "sample" DATA a$()

Run then rewind the tape and NEW.

10 LOAD "" data a$()
20 PRINT a$
30 PRINT a$()

This does not work! For some reason, if you SAVE a string using the DATA token, the string is saved and then can be loaded back into the computer, but not in a form that can be used.

There is a simple patch that solves this problem by putting the string into a one dimensional array:

20 DIM t$( LEN a$)
30 FOR i=1 TO LEN a$
40 LET t$(i)=a$(i)
50 NEXT i

If you save t$, when you LOAD it back in, it can be used as a normal string.

Products

 

Media

 

Image Gallery

Source Code

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top