A BASIC! Program
A BASIC! program is made up of lines of text. With a few exceptions that will be explained later, each line of text is one or more statements. If a line has more than one statement they are separated by colon (":") characters.
A statement always consists of a single command, usually followed by one or more parameters that are separated by commas. Here is a simple BASIC! program:
PRINT "Hello, World!"
This program has one statement. The command is PRINT
. It has one parameter, the string constant "Hello, World!"
. (A string constant, or string literal, is a set of characters enclosed in double quotation marks. This, too, will be explained later.)
If you start the BASIC! app, so you are in the Editor, you can type in this one-line program. Then you can select Run
from the Editor’s menu. BASIC! will run your program. When the program is done running, you see the Console
, BASIC!’s, output screen, with Hello, World!
printed at the top.