Words and variables together

You often need to display words next to the contents of a variable. To do this you use PRINT followed by the variable name and the words, separated by a semicolon. In BASIC a semicolon tells the computer to display the next piece of information on the same line.

A semicolon looks like ;.

NEW
10 CLS
20 N=7
30 PRINT N; "SLIMY SLUGS"
40 PRINT "ATE, ";N;" SOGGY SANDWICHES"
RUN

The spaces inside the quotes on line 40 make the computer leave a space on the screen between the words and the contents of the variable. You can also leave spaces outside the quotes, but the computer ignores them.