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
THREE MODELS FOR USER INTERFACE DESIGN   The 3 models for the user interface design are the implementation model, mental model &the manifest model. The Implementation Mod

DATA TYPES   The different primitive data types are Boolean, Char, Byte, Date, Decimal, Uinteger, Double, Integer, Long, Sbyte, Short, Single, String, Ulong & Ushort. To decla

Let us modify the webTime ASP.NET project that we developed. We will add drop down lists for modifying the different style elements for the label element that displays the time. We

steps of connecting database from vb6.0

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

Software That Is Obscure: The Software hides the intensions, meaning and actions from the user. For illustration, if a user is asked whether a full installation, the custom in

What I understand from the assignment is I have to make the VB code in file nu1. xlsm generic, and run several iterations for Kc and Ti to find out the optimal combination which wi

GENETICS 1.         The branch genetics started in 1900 after rediscovery of Mendel's work. 2.         Gregor Johann Mendel is called Father of genetics. 3.         The t

Do Until Loop Statement: The statements within the do...until loop block executes till the condition given in until become true. The working of do...until loop is elaborated w

A triangle is equilateral if all three sides are equal, isosceles if any two (but no more than two) sides are equal, and scalene if no two sides are equal. A triangle will be input