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

Do until loop statement , Do Until Loop Statement: The statements with...

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

For next loop - vbscript, You can employ For...Next statements to run a blo...

You can employ For...Next statements to run a block of statements a specific number of times. For loops, employ a counter variable whose value is increased or decreased with each r

Adding events in visual basic , Adding Events in VB   For adding the e...

Adding Events in VB   For adding the events in VB, first double click on the command button with the caption hello. The Private Sub command1_Click () and End Sub would be

XML document, Write a XML with database with book details (BOOK ID, Title, ...

Write a XML with database with book details (BOOK ID, Title, Author, subject, published Year, language, vendor, price)

Dynamic link library - database applications, DYNAMIC LINK LIBRARY   T...

DYNAMIC LINK LIBRARY   The dynamic link library (dll) permits one copy of a function to be shared among some parallel executing programs. The dll is a file that contains a num

Number property, Returns or sets a numeric value indicating an error. Numbe...

Returns or sets a numeric value indicating an error. Number is the Err object's default property. While returning user-defined error from an Automation object, set Err.Number throu

Variable scope prefixes, Variable Scope Prefixes As script size rise, s...

Variable Scope Prefixes As script size rise, so does the value of being capable to rapidly differentiate the scope of variables. A one-letter scope prefix preceding type prefix

Shopping cart, Shopping Cart Purpose – Allows user to browse while keeping ...

Shopping Cart Purpose – Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for al

Employee data, Part 1: Create an application that allows the user to enter ...

Part 1: Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephon

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