Decade | Data Type |
---|---|
1950s | Numeric |
1960s | Alphanumeric |
1970s | Text |
1980s | Images, speech |
1990s | Music, low-quality video |
2000s | High-quality video |
There are many refinements on the data types shown above. For example, we can distinguish between floating-point numbers (those with a decimal point) and fixed-point numbers (those with no decimal point).
VB programs can work with many types of data, and we have already seen three of them:
Data type | Example or explanation |
---|---|
string | "Hello, my friend!" or "Bob" |
numeric | numbers like 15 (fixed point) and 1.33 (floating point) |
boolean | true/false data |
(Boolean data is named in honor of George Boole, a mathematician who invented formal logic in which we deal with statements that are either "true" or "false.")
Properties have data types, and when we assign values to the properties, those values must be of proper data type. Think back to some of the properties we have been using -- each has its own data type:
Property | Data Type |
---|---|
name | string |
text | string |
top | numeric |
left | numeric |
visible | boolean |
multiline | boolean |
We will see other VB data types and subdivisions of these in the future.
We showed the data types of various properties in this example, but data types will occur in many contexts we have not yet covered. For example, we will see that variables, constants, expression, and functions also have data types.