Data types - visual basic, Visual Basic Programming


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
create an application that performs the following operation with the employee file created by the application in programming challenge 1: uses an open dialog box to allow the user

Returns or sets the name of the object or application which generated the error originally. The Source property indicates a string expression which is usually the class name or pro

DOCUMENT VIEW ARCHITECTURE The Document/View architecture is used to build an application based on the Microsoft Foundation Classes library. The Document/View architecture is s

Record Set: The record set presents the records in a base table or the records retrieved due to the query. The record set falls into 3 classes. These are table type record set

APPWIZARD   The Appwizard is a tool used for creating a project. It follows a series of steps to create a project. Steps Involved in Creating A Project: Step 1: Fr

You declare variables explicitly in script via the Dim statement, the Public statement, & the Private statement. For illustration: Dim DegreesFahrenheit You declare multiple

DIALOG BOXES IN VB The two dialog boxes, namely, the message box and the input box are usually used in the Visual Basic. The message box is used for displaying the messages to

SDK PROGRAMMING The SDK programming is a developing Win 32 based programs using the Win 32 API that directly interact with the hardware. Therefore the execution of the SDK prog

Describe different validation controls of

how to make dictionary in vb using ms access