Data types

Computer and communication systems work with many types of data or data types. The first computers worked on numeric data (that is why they were called "computers "). From the start, people understood computers could process other data types, but they were very expensive, so text processing, image processing, etc. were restricted to research labs and prototypes. As technology has progressed, affordable computers could do more and more, and these research programs moved into general use. The following table shows the decades in which the processing of selected types of data became economically feasible:

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.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.