--- title: "Microsoft BASIC vs Sinclair BASIC String Handling" type: "article" slug: "microsoft-basic-vs-sinclair-basic-string-handling" url: "http://localhost/article/microsoft-basic-vs-sinclair-basic-string-handling/" markdown_url: "http://localhost/article/microsoft-basic-vs-sinclair-basic-string-handling.md" published_at: "2026-11-21T22:03:22+00:00" modified_at: "2026-11-21T22:03:22+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Marty J., has been entering some Microsoft BASIC programs into his 2068. He offers the following sample correlation for STRING handling. MISCROSOFT RESULTS SINCLAIR BASIC MID$(A$,3,2,) LL A$(3 to 4) LEFT$(A$,2) HE A$(to 2) RIGHT$(A$,2) LO A$(LEN(A$)-1 To) MICROSOFT BASIC 10 A$=\"HELLO\" 20 LPRINT MID$ (A$,3,2) 30 LPRINT LEFT$(A$,2) 40 LPRINT RIGHT$(A$,2) LL HE LO…" post_tag: - name: "BASIC (programming language)" slug: "basic-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/basic-programming-language/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "IBM PC" slug: "ibm-pc" taxonomy: "post_tag" url: "http://localhost/tag/ibm-pc/" - 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/" authors: "Marty J." issues_articles: - id: 40218 title: "LISTing Newsletter Sample Issue" type: "issue" url: "http://localhost/issue/listing-newsletter-sample-issue-2/" pages: "P3 (PDF 6)" pubdate: "Sample Issue" archive_link: false --- # Microsoft BASIC vs Sinclair BASIC String Handling Marty J., has been entering some Microsoft BASIC programs into his 2068. He offers the following sample correlation for STRING handling. ``` MISCROSOFT RESULTS SINCLAIR BASIC MID$(A$,3,2,) LL A$(3 to 4) LEFT$(A$,2) HE A$(to 2) RIGHT$(A$,2) LO A$(LEN(A$)-1 To) ``` ### MICROSOFT BASIC ``` 10 A$="HELLO" 20 LPRINT MID$ (A$,3,2) 30 LPRINT LEFT$(A$,2) 40 LPRINT RIGHT$(A$,2) LL HE LO ``` (IBM PC) ### SINCLAIR BASIC ``` 10 LET a$="hello" 20 PRINT a$( TO 2) 30 PRINT a$(3 TO 4) 40 PRINT a$(LEN a$-1 TO ) he LL LO ``` NOTE: Lines 20 & 30 are reversed. [![The Microsoft BASIC and Sinclair BASIC sample runs as printed (hand-inked)](http://localhost/wp-content/uploads/2026/11/listing-new-sample-marty-j-string-handling-1-866x1024.png)](http://localhost/wp-content/uploads/2026/11/listing-new-sample-marty-j-string-handling-1.png)The Microsoft BASIC and Sinclair BASIC sample runs as printed (hand-inked)