Page 3 - revision
P. 3
Orouba Language Schools Third Preparatory
Computer Department Second Term 2017/2018
Variables Variables are reserved places in computer memory (RAM) declared
and determined by its name and type (Data Type), and its value
Constants changes during the running of the program.
Naming rules of They are reserved places in computer memory (RAM) declared and
Variables & determined by its name and type (Data Type), They take a fixed value
Constants and do not change during the progress of the program.
1- Names must begin with a letter or underscore (_).
Declaring 2- Names should not contain symbols or special characters (e.g.: ?,*,^,
Constants
Declaring -, +,. etc.).
Variables 3- Do not use reserved words (Visual Basic.NET Language
Assignment Keywords) such as (single, Dim, As).
Statement
Const Constant name As Data Type = Value
Dim Variable_Name As Data Type [= Initial Value]
optional
It is assigning a value to a constant or variable.
It is a statement that has two sides (right hand side and left hand side)
separated by the assignment operator (=).
It takes the value on the right side of the assignment operator (=)
and stores it in the variable on the left.
The double quotes
" " It is used if the value of constant or variable is string value.
The hashes # # are used if the value of variable or constant is date or time.
It happens when writing code incorrectly OR the value of constant is
Syntax Error
not assigned during the declaration.
Final Revision 3