Variant type - visual basic, Visual Basic Programming

Assignment Help:

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


Related Discussions:- Variant type - visual basic

Student record management system, i need your help in designing and coding ...

i need your help in designing and coding a student record management system

Fixed length strings, Fixed length strings: The Fixed length strings ar...

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

Adding records - data control, Adding Records: 1. As in the earlier ca...

Adding Records: 1. As in the earlier case Set the DatabaseName property as "C:\ex.mdb", now Set the Record Source for the data control as Customer and Set the Record Type to 0

Loop statement from inside the loop, You can exit a Do...Loop using the Exi...

You can exit a Do...Loop using the Exit Do statement. Since usually you desire to exit only in certain situations, such as to ignore an endless loop, you should employ the Exit Do

Deleting handlers with class wizard, Deleting Handlers With Class Wizard: ...

Deleting Handlers With Class Wizard: The handler can be deleted by using the class wizard. The class wizard will delete the prototype and message map entry. The user should ma

Vb script, We will discuss scripting language; called VB Script. VBScript i...

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

Lotto, You are asked to create the LOTO game customized according to the fo...

You are asked to create the LOTO game customized according to the following constraints: 1. Create a grid containing 20 numbers (20 buttons: button1, button2, …button20) 2. When t

How to, need general help in pseudo code

need general help in pseudo code

Properties - intrinsic control, Properties: Every control has a defaul...

Properties: Every control has a default property related with it. The default property does not require to be named when you are functioning. The control Check box as value

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