What are the different types of variables available in QB?
The table below shows the different types of variables available in QBasic:
- The first 4 types are used to store numbers:
- The Single-precision and double-precision types store floating point numbers. (ie: 45.68474, 38389.3946)
- The integer and long-integer types store integers, or numbers without decimal points. (ie: 40, 2, 345678)
- The String variables store characters, letters, texts, sentences. (ie: "Hello!")
- If no suffix is assigned, a variable is automatically classified by QB as single-precision.
Data are stored in memory variables, or constants. In QBasic variables should respect the following rules:
- The length should not be greater than 40 characters
- They should start with a letter
- They should not contain spaces
- They do not support certain characters such as (
Submitted by: Pete on June 22, 2004
Return to the FAQ