You are on page 1of 1

CONSTANTS: Keyword CONST

             - Containers whose values, once set cannot be changed anymore


VARIABLES: Keyword DIM
             - Containers whose values can be changed
DATA TYPE- denotes the possible value of a variable or constant
ARITHMETIC AND ASSIGNMENT OPERATORS
    * Operator Precedence- specifies which operators will be evaluated first if there are several operators in an
expression
    * Assignment Operator- has the lowest precedence among all operators. The assignment operator gets
evaluated last in an expression

COMMONLY USED VISUAL BASIC ARITHMETIC OPERATORS

  ARITHMETIC OPERATION                 OPERATION SYMBOL


Exponential                                                ^
Negation                                             -
Multiplication, Division                        *, /
Integer Division                                  /
Modulus Arithmetic                 Mod
Addition, Subtraction               +,-

Comparison and Logical Operators


   * Comparison Operators- compares two expression and return a Boolean value that represents the
relationship of their values. Arithmetic operators have precedence over comparison operators

Commonly Used V.B Comparison Operators

Comparison Operation                   Operation Symbol


Equality (equal to)                  =
Inequality (not equal to)            <>
Less than                         <
Greater than                   >
Less than or equal to          <=
Greater than or equal to        >=

LOGICAL OPERATORS - compare Boolean expressions and return a Boolean result. Comparison operators
have precedence over logical operators.

CONCATENATION OPERATORS AND STRING FUNCTIONS


         Concatenation operators join multiple strings into a single sting. The most commonly used concatenation
operator is the "&" operator.

    Example:
                   Dim x,y,z As string
                       x= "hello"
                       y= "world"
                       z= x & "," & y & "!"

             Output:
                         hello, world!

You might also like