Data types - visual basic, Visual Basic Programming

Assignment Help:

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.


Related Discussions:- Data types - visual basic

If then else - control statement, If Then Else: The control statement ...

If Then Else: The control statement If Then Else is used for computing a condition and taking the action based on the condition. If the condition is true then the section will

Program for computing automobile repair bills, A program is needed to assis...

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

Message handling - class wizard, Message Handling: 1. The message is s...

Message Handling: 1. The message is send to the window. And it is sent to the Window Procedure. 2. The message map holds all the message handlers. 3. The window procedur

Ddx - dialog data exchange, DDX - Dialog Data Exchange: The Data membe...

DDX - Dialog Data Exchange: The Data members can be related with specific controls in the dialog box. When the dialog box is displayed, the DDX will transfer the values into t

Making decisions with select case, The Select Case structure provides an op...

The Select Case structure provides an option to If...Then...Else If for selectively executing one block of statements from amongst multiple blocks of statements. Any Select Case st

Intrinsic controls, INTRINSIC CONTROLS   The Intrinsic controls are th...

INTRINSIC CONTROLS   The Intrinsic controls are the built-in controls. Few of the controls are Combo box, Check box, Command Button, Label etc. The controls have properties re

Cell phone application, to dial a person''s 10 digit number and assign it t...

to dial a person''s 10 digit number and assign it to their name

Dynamic link library - dll , DYNAMIC LINK LIBRARY - DLL   The DLL are ...

DYNAMIC LINK LIBRARY - DLL   The DLL are files which can be called when required by the other program that is running in the computer. The DLL files which support the specific

Scope and lifetime of variables, The scope of a variable is finding out by ...

The scope of a variable is finding out by where you declare it. While you declare a variable in a procedure, only code in that procedure can access or alter the value of that varia

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd