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
Assigning Values to Variables Values are assigned to variables creating an expression as follows: the variable is on the left side of the expression & the value you desire to a

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

i need to do my final project for my last year bsc honours degree in Business Information systems. I need to develop a system which is operational for hotel management system. th

Mostly time, you just desire to assign a single value to a variable you have declared. A variable having a single value is a scalar variable. At other times, this is convenient to

I have a project due tomorrow that I am really struggling in. Please help.

This is from the book Programming in Visual Basic 2010 by Julia Case Bradley and Anita C. Millspaugh. The assignment is located in Chapter 3 on page 154. Before I type it in, I wou

A Sub procedure is a series of VBScript statements, enclosed through Sub & End Sub statements which perform actions however don't return a value. A Sub procedure can take arguments

Graphics Device Interface - GDI:   The GDI is a windows API. The GDI uses a set of generic graphics objects to draw to the screen, to the memory and printers. Therefore the p

ODBC   The ODBC gives an API which distinguishes the data base vendors implementation via the ODBC drivers specific to a DBMS. The program will use the API to call the ODBC dr

This is a series of VBScript statements enclosed through the Function & End Function statements. A Function procedure is same to a Sub procedure, however can also return a value. T