Data types - visual basic, Visual Basic Programming

DATA TYPES 

The different primitive data types are Boolean, Char, Byte, Date, Decimal, Uinteger, Double, Integer, Long, Sbyte, Short, Single, String, Ulong & Ushort. To declare the variables the DIM statement is used. For illustration to say a variable sum is of integer type, either of the below statements can be used.

Dim sum As Integer

Dim sum%

The common syntax for declaring a variable is Dim followed by the variable followed by As keyword followed by the datatype that is again a keyword. The table gives an idea of the other data types.

846_data types.png

Table: The various data types in visual basic

Dim is used for declaring the variables in procedures. Every time the procedure is called, the data stored in the variables declared with this keyword are reset. The Static is used to declare the variables in procedures. Every time the procedure is called, the data stored in the static variables are retained.

Public is used to declare the variables within a module. The variable is accessible to all process in the project.

Private is used to declare the variables within a module. The variable is only accessible to process within the project.

ReDim: The keyword ReDim is used to re-dimension an array.

Posted Date: 10/9/2012 8:11:36 AM | Location : United States







Related Discussions:- Data types - visual basic, Assignment Help, Ask Question on Data types - visual basic, Get Answer, Expert's Help, Data types - visual basic Discussions

Write discussion on Data types - visual basic
Your posts are moderated
Related Questions
Associating Images to Toolbars: 1. Add an Image list to your form from the tool box. 2. Pick the custom property of the image list. 3. Click the images tab. 4. Select

Message Box: The Message Box can be specified a title as shown in figure to specify the title for the message box follow by the command given below:  Private Sub Command1_C

MDI Application: The MDI application utilizes the main frame window as the work space in which the user can open more document frame windows.

Write a XML with database with book details (BOOK ID, Title, Author, subject, published Year, language, vendor, price)

Do While Loop Statement : The statements contained by the do...while loop block executes till the condition given in the while is true. The working of do...loop is elaborate

Select Case: The Select Case is used for handling the multiple paths. The Select Case computes the expression and depending on the value of the equivalent Case statement execu

USE OF SERIALIZE FUNCTION IN DOCUMENT CLASS TO IMPLEMENT FILE void CStoreDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here }

A variable is convenient placeholder which refers to a computer memory location where you can store program information which may change when your script is running. For instance,

In this assignment, you will create an application that calculates and displays a customer's monthly cable bill. Your interface should look like this: Requirements:

A program is needed to assist computing automobile repair bills. The cost of labor is $35 per hour. The costs for parts are subject to a 5% sales tax, which should be added t