BASIC Programming/Beginning BASIC/Variables and Data Types

Variables allow you to store and change information. Below is an example how to use variables.

Example Code for Variables
Example 1 (qBasic)

Example 1.2 (freeBasic)

Output
Example 1 Hello World 10

In Basic, a string variable ends in a $, and whole number variables, known as integers, end with a %.

Example 2 John Doe 42

If you use Dim varName As DataType to declare variables, you do not need to use a suffix.

Arrays
An array is a collection of values.