Tuesday 30 August 2016

Class 8 : Operators in VB

Ch : 5 Operators and Functions

In this chapter we are going to learn about the basic steps such as variable, data type, operator in Visual Basic
1. Variable :
The value is going to change every time.
x=3 , here x is a variable.
Rules for naming a variable :
1. First character should be a letter.
2. Other characters may be letter,digit.
3. No special characters except underscore( _ ).
4. Maximum limit is 255 characters.
5. Keywords are not allowed.
Examples :
1. a   -  Valid variable
2. s1  - Valid variable
3. Computer_Science - Valid variable
Identify the valid and invalid variables :
1.  _123              - Invalid variable(Should start with an alphabet)
2.  Bond007        - Valid variable
3.  Cotton  Boys  - Invalid variable(Special character space)
4. Middle      - Valid variable
5. ProgRam   - Valid variable
6. A * b         - Invalid variable(Special character *)