--- title: "Try this… TS 2068" type: "article" slug: "try-this-ts-2068" url: "http://localhost/article/try-this-ts-2068/" markdown_url: "http://localhost/article/try-this-ts-2068.md" published_at: "2022-10-07T12:24:25+00:00" modified_at: "2026-08-05T13:13:12+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "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…" category: - name: "LISTing Newsletter" slug: "listing-newsletter" taxonomy: "category" url: "http://localhost/category/periodicals/listing-newsletter/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" publication_r: id: 38992 title: "LISTing Newsletter" type: "periodical" url: "http://localhost/periodical/listing-newsletter/" issues_articles: - id: 40115 title: "LISTing Newsletter April 1985" type: "issue" url: "http://localhost/issue/listing-newsletter-april-1985/" pages: "19" pubdate: "April 1985" archive_link: false --- # Try this… TS 2068 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.