07-11-2006, 10:53 PM
These are the listed data types that can be used, their ranges (minimum and maximum values), and how many bytes they use:
Type: Byte
Bytes Used: 1
Range: 0 to 255
Type: Integer
Bytes Used: 2
Range: – 32,768 to 32,767
Type: Long
Bytes Used: 4
Range: – 2,147,483,648 to 2,147,483,647
Type: Single
Bytes Used: 4
Range: – 3.402823E38 to – 1.401298E – 45 (negative values)
1.401298E – 45 to 3.402823E38 (positive values)
Type: Double
Bytes Used: 8
Range: – 1.79769313486231E308 to – 4.94065645841247E – 324 (negative values)
4.94065645841247E – 324 to 1.79769313486231E308 (positive values)
Type: Currency
Bytes Used: 8
Range: 922,337,203,685,477.5808 to 922,337,203,685,477.5807
Type: String
Bytes Used: String Length
Range: Zero to approximately two billion characters
Type: Variant
Bytes Used: 16 bytes, plus 1 byte for each character if a string value.
Range: Date values: January 1, 100 to December 31, 9999
Numeric values: same range as Double
String values: same range as String Can also contain Error or Null values
Type: Boolean
Bytes Used: 2
Range: True or False
Type: Date
Bytes Used: 8
Range: January 1, 100 to December 31, 9999
Type: Object
Bytes Used: 4
Range: Any "Object" Reference
I thought these would be useful to anyone writting code, or trying to better understand how vb handles different memory values with the different data types available.
Enjoy
Type: Byte
Bytes Used: 1
Range: 0 to 255
Type: Integer
Bytes Used: 2
Range: – 32,768 to 32,767
Type: Long
Bytes Used: 4
Range: – 2,147,483,648 to 2,147,483,647
Type: Single
Bytes Used: 4
Range: – 3.402823E38 to – 1.401298E – 45 (negative values)
1.401298E – 45 to 3.402823E38 (positive values)
Type: Double
Bytes Used: 8
Range: – 1.79769313486231E308 to – 4.94065645841247E – 324 (negative values)
4.94065645841247E – 324 to 1.79769313486231E308 (positive values)
Type: Currency
Bytes Used: 8
Range: 922,337,203,685,477.5808 to 922,337,203,685,477.5807
Type: String
Bytes Used: String Length
Range: Zero to approximately two billion characters
Type: Variant
Bytes Used: 16 bytes, plus 1 byte for each character if a string value.
Range: Date values: January 1, 100 to December 31, 9999
Numeric values: same range as Double
String values: same range as String Can also contain Error or Null values
Type: Boolean
Bytes Used: 2
Range: True or False
Type: Date
Bytes Used: 8
Range: January 1, 100 to December 31, 9999
Type: Object
Bytes Used: 4
Range: Any "Object" Reference
I thought these would be useful to anyone writting code, or trying to better understand how vb handles different memory values with the different data types available.
Enjoy
