BENJAMIN MUCHEMI SC200/0119/2021
11th February 2022
[Link] Data Types
1. Object
An object is a combination of code on data that can be treated as a unit.
An object can be a piece of an application, like a control or a form. An entire application can also be an
object.
Type Storage Range of values
Object 4 bytes on Any type can be stored in a variable of type
32-bit object
platform
8 bytes on
64-bit
platform
2. Boolean
Boolean data types hold either a true or false value.
These are not stored as numeric values and cannot be used as such. Values are internally stored as -1
(True) and 0 (False) and any non-zero value is considered as true.
Stora Range of
Type
ge values
Boole 2 byt
True or False
an es
3. Date
Used to store date and time values.
Typ Stora
Range of values
e ge
Dat 8 byt 0:00:00 (midnight) on January 1, 0001 through 11:59:59 PM on
e es December 31, 9999
4. Variant
Is the default Visual Basic data type and it stores any type of data.
Type Storage Range of values
Variant Any value as large as
16 bytes
(numeric) Double
Length+22 Same as variable-
Variant (text)
bytes length string
5. String
Used to store alphanumeric values. A variable length string can store approximately 4 billion characters.
Type Storage Range of values
String (fixed Length of 1 to 65,400
length) string characters
String (variable Length + 10 0 to 2 billion
length) bytes characters
6. Numeric
Comprises numbers that can be calculated using various standard arithmetic
operators.
Stora Explanation
Type Range of Values
ge
Byte 1 byte 0 through 255 Stores integer values
2 byte Stores integer values
Integer -32,768 through 32,767
s
4 byte -2,147,483,648 Stores integer values
Long
s through 2,147,483,648
-3.402823E+38 through - Stores floating point values
4 byte 1.401298E-45 for negative values
Single
s 1.401298E-45 through
3.402823E+38 for positive values.
-1.79769313486232e+308 through Stores large floating values which
-4.94065645841247E-324 for exceeds the single data type
value
8 byte negative values
Double
s 4.94065645841247E-324 through
1.79769313486232e+308 for
positive values.
stores monetary values.
Curren 8 byte -922,337,203,685,477.5808 It supports 4 digits to the right of
cy s through 922,337,203,685,477.5807 decimal point and 15 digits to the
left
+/- It provides the greatest
79,228,162,514,264,337,593,543,9 number of significant digits
50,335 for a number
Decim 12 byt
if no decimal is use
al es
+/-
7.922816251426433759354395033
5 (28 decimal places).