Wednesday 13 June 2012

BASIC ELEMENTS IN PROGRAMMING : Data Types

Data type determines the type of data a variable can store, for example a number or a character. Examples of data types are integer, double, string and boolean.

 
Integer
Integer data type contains any whole number value that does not have any fractional part.

This is how we declare an integer type constant in Visual Basic statement.
 
 This is how we declare an integer type variable in Visual Basic statement.


Double
Any number value that may and could contain a fractional part.


This is how we declare a double type constant in Visual Basic statement.


This is how we declare a double type variable in Visual Basic statement.


String
Any value that contains a sequence of characters.


This is how we declare string type constant in Visual Basic statement.


This is how we declare string type variable in Visual Basic statement.

Boolean
Boolean type consists either a True or False value. Programmers usually use it to store status.


This is how we declare a boolean type constant in Visual Basic statement.


This is how we declare a boolean type variable in Visual Basic statement.

 
OTHER DATA TYPES



 __________________________________________________________________________________
 Others Lesson : | click lesson to view |

0 comments:

Post a Comment