You are on page 1of 10

Nehru Arts And Science College

Visual Basic
Ms. V.Kavitha
Assistant Professor
Department of Computer Science
Nehru Arts and Science College
Coimbatore
UNIT - I
Module – II
Visual Basic
Fundamentals
Numeric COnstants
 Numbers are reffered to as numeric constants as
Integers, long integers, single-precision real
quantities, double – precision real quantities
 Interger constants occupies two bytes
 It ranges from -32,768 to 32,767
 It does not have decimal point or an exponent
 Single-precision – Four Bytes (ie) 3.4x10power 38
 Double precision – Eight Bytes (ie) 1.8x10power
minus 2
String Constants
• A string is sequence of characters (ie)
letters, numbers and certain special characters
such ac +, -, /, *, =, $, enclosed in quatotion marks
•The maximum number of characters included within

a string constants
•The maximum length of a string constant can be

infinite
• Eg: “GOOD MORNING”, “345286”, “CHAR”
VARAIABLES
• A variable is a name that represents a
numerical quantity, a string or other basic data
item
• variable name must begin with letter
• characters may be letters or digits
• variable name cannot exceed 255 characters
• It does not distinguish between uppercase and
lower case letters
VARAIABLES
• It includes a number of reserved words (like Dim,
if ifelse, Select, Case, Do etc)
• Reserved words cannot be used as a variable
names
• Eg: Variable names – Area, radius, a, b, count
Data Types and Declarations
 Visual Bsic supports all common data types , includes
Integer, Long, Single, Double and String
 It support other datatypes such as Boolean, Byte,
Currency, Date, Time and User defined data types
 Dim statement is used to associate variables with
specific data types
Eg: a as Integer, area as Single
Declarations
 The Process which is common to all modern
programming languages is known as data
declaration
Eg: Dim Count as Integer
Dim a as Integer
Dim name as String
Dim area as Single
VB – Video File
 Visual Basic Tutorial 2017.mp4
 Visual Basic Tutorial 2017_part1_2.mp4

You might also like