Programming TIP

Authors

Publication

Pub Details

Date

Pages

See all articles from SUM v3 n5

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!

Products

 

Downloadable Media

 

Image Gallery

Source Code

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

People

No people associated with this content.

Scroll to Top