Variant type - visual basic, Visual Basic Programming

Variant Type:

If no data type is related with the VB variables, it takes the default variant type. The variable x will be of the variant type when the two declarations below are used.

Dim x

Dim x as Variant

A variant type can take string, numeric, date, null or Boolean values.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As

Single)

Dim i As Integer

Dim j As Long

Dim a As Single

Dim b As Double

Dim c As Single

Dim c1 As Currency

i = 32767 ' range is upto 32767 beyond that overflow occurs

j = 97400

Form1.Print "integer i is"; i

Form1.Print "long j is"; j

a = 8.97655467787088 '8.976555

b = 0.876554677870879

c = 100000000 '1E+08

c1 = 100000000

Form1.Print "single a is"; a

Form1.Print "double b is"; b

Form1.Print "single c is"; c

Form1.Print "currency c1 is"; c1

End Sub

Posted Date: 10/9/2012 8:19:35 AM | Location : United States







Related Discussions:- Variant type - visual basic, Assignment Help, Ask Question on Variant type - visual basic, Get Answer, Expert's Help, Variant type - visual basic Discussions

Write discussion on Variant type - visual basic
Your posts are moderated
Related Questions
I have an assignment In HCI , can anyone help me ?

Fixed length strings: The Fixed length strings are declared by identifying the size of the string. For illustration to give a length of 20 for the string place, the declarati

Retrieval Methods: There are 3 ways to find a document. The primary method is a positional retrieval. This is achieved by keeping in mind where you left it. The next method is

Databound Controls - A controls use to display the contents of table using Data Control , have to bound each Control to the specific field and the controls are Known as the Data Bo

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

HOW TO MAKE ER DIAGRAM FOR DISTRIBUTER MANAGEMNET OF WATER PURIFIAR

In this unit you have learned how to develop Web pages which use VBScript. You have learned to insert logic to your Web pages as along with any other programming application. You h

A program needs to be written that is capable of simple image processing. All the images that are available for you to use, can be found on Blackboard in the Assignments section. T


We will discuss scripting language; called VB Script. VBScript is Microsoft's scripting language. It enables us to write programs which enhance the power of Web pages by letting us