Export (0) Print
Expand All

Integer Data Type for Visual Basic 6.0 Users 

Visual Basic updates the integer data types for interoperability with other programming languages and with the common language runtime.

The following table shows correspondences between integer types in Visual Basic 6.0 and Visual Basic 2005.

Integer size Visual Basic 6.0 type and identifier type character Visual Basic 2005 type and identifier type character Common language runtime (CLR) type

8 bits, signed

(none)

SByte (none)

System.SByte

8 bits, unsigned

Byte (none)

Byte (none)

System.Byte

16 bits, signed

Integer (%)

Short (none)

System.Int16

16 bits, unsigned

(none)

UShort (none)

System.UInt16

32 bits, signed

Long (&)

Integer (%)

System.Int32

32 bits, unsigned

(none)

UInteger (none)

System.UInt32

64 bits, signed

(none)

Long (&)

System.Int64

64 bits, unsigned

(none)

ULong (none)

System.UInt64

On 32-bit systems, 32-bit integer operations are faster than either 16-bit or 64-bit integer operations. This means that in Visual Basic 2005, Integer and UInteger are the most efficient and fundamental numeric types. You can improve performance in your applications by changing your Long declarations to Integer when you migrate to Visual Basic 2005.

NoteNote

If you are interfacing with components created on platforms other than Visual Basic 2005, you must take care that your data types correspond to those of the other components. For example, if you use a Declare statement to refer to an external procedure created in Visual Basic 6.0, and the procedure defines an Integer argument (two bytes in Visual Basic 6.0), you must identify that argument as Short in the Declare statement, because that is the two-byte integer type in Visual Basic 2005.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft