--- title: "Programming TIP" type: "article" slug: "programming-tip" url: "http://localhost/article/programming-tip/" markdown_url: "http://localhost/article/programming-tip.md" published_at: "2020-10-27T17:10:39+00:00" modified_at: "2026-06-17T10:14:51+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "What does the following line do? 10 IF A$=\"YES\" THEN LET X=1: PRINT \"You pressed YES\": STOP At first glance, it would appear that whenever the computer came across this line, it would check to see if A$ 15 \"YES\". If not, it would not make x=1 and then because it is a multi-line statement,…" category: - name: "SUM" slug: "sum" taxonomy: "category" url: "http://localhost/category/periodicals/sum/" post_tag: - 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: "SUM" publication_r: id: 10242 title: "SUM" type: "periodical" url: "http://localhost/periodical/sum/" volume: "3" issue: "5" issues_articles: - id: 26626 title: "SUM v3 n5" type: "issue" url: "http://localhost/issue/sum-v3-n5/" pages: "26" pubdate: "May 1985" archive_link: false volumeissue: "vIIIn5" --- What does the following line do? ``` 10 IF A$="YES" THEN LET X=1: PRINT "You pressed YES": STOP ``` At first glance, it would appear that whenever the computer came across this line, it would check to see if A$ 15 “YES”. If not, it would not make x=1 and then because it is a multi-line statement, it would print the message and then STOP. NOT SO! Due to the nature of the operating system, the statements following conditional check will only be executed when the IF – THEN statement is true. No more “go to a subroutine” is needed when you want to do more than one thing when a condition is true. Just put them after the check in a multi-statement line format!