Variables are items that can be stored in the computer's Random Access Memory (RAM), from then on can be refered to and used. To effectively use a variable, it must be declared so that it is stored in the RAM. Then Initialized, to do this, it must be given a value. Below, are the different types of variables, aswell as how to declare and initialize them.
Boolean Variables (True/False): Are either true or false, they can be used for any question with only two answers. To declare and initialize enter the code below:
Declare: boolean blnVar;
Initialize: blnVar = true;
Integer Variables (..., -3, -2, -1, 0, 1, 2, 3, ...): Are very usefull for counting and keepig track of number within a program. If no decimals are involved, integer variables are the best option.
Declare: int32 intVar;
Initialize: intVar = -47;
Decimal Numbers (3.14, -0.12345, 1.e+34): When dealing with decimals or fractions, the most effectivie variable is the double precision floating-point number.
Declare: Double dblVar;
Initialize: dblVar = 301.235;
Words: To represent words, string variables are the most effective. Strings are any combination of letters, numbers or punctuation marks.
Declare: String strVar;
Initialize: strVar = "Hi";