The first program.

You are now ready to write your first program in MiniBasic. Traditionally, this is “Hello World”.

Firstly you need to install the MiniBasic interpreter. On a PC this is done by copying the executable MiniBasic.exe to your hard drive. Then you open a text editor and type

10 PRINT “Hello World”

Remember to terminate with a newline.

Save as “Hello.mb” (the extension is optional).

You then call the interpreter by typing “MiniBasic Hello.mb” in a command prompt.

You should see the output
Hello World

All MiniBasic programs have line numbers. Execution begins with the first line and ends with the last line. Lines must be in order and every statement must have a number. The number must be the first character in the line. However, we can spread long strings (sequences of characters) over several lines. This second program

10 PRINT “In the beginning God created the heavens and the Earth”
“and the Earth was without form and void “

Will output a string too long to easily fit on one line. Note that the second line must begin with a space character, to indicate that it is a continuation of the first line.