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
Write Visual Basic programs for the following: 1.     Write a program that uses a "For Loop" to generate a list of temperature conversions in one degree increments from a given

You can employ Do...Loop statements to run a block of statements indefinite number of times. The statements are repeated either whilst a condition is True or till a condition becom

A Project to Display a Database: 1. Suppose that there are 5 fields describing a customer. Id, address, name, city & state. 2. Put 5 text boxes on the form to exhibit the r

In VBScript, the While...Wend statement is provided for those who are familiar along its usage. However, due to the lack of flexibility in While...Wend, it is suggested that you us

Write a program to print a digital clock which displays the time for 2 hours . ..

What are the differences between Property Get, Set and Let? Set - Value assigned to ActiveX Object from the form. Let - Value retried to ActiveX Object from the form. Get- Assigns

I need a VB6 software for making a soccerboard for 10 teams & automatically generate their fixtures

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,

Objective: To develop an Application (Excel + VBA) that determines the optimal inventory policy under an All-Units Discount scheme. APPLICATION CHARACTERISTICS Consider the

For ..... Next Repetition Statement: To demonstrate the working of for .. next control statement, put a command button and a label control on the form. The Handle clicks the e