A record allows you to keep related data items in one structure. If you want information about a person, you may want to know name, age, city, state, and zip.
To declare a record, you'd use:
For example:
Each of the identifiers Name, Age, City, State, and Zip are referred to as fields. You access a field within a variable by:
A period separates the variable and the field name.
There's a very useful statement for dealing with records. If you are going to be using one record variable for a long time and don't feel like typing the variable name over and over, you can strip off the variable name and use only field identifiers. You do this by:
Example:
<<< Previous | Table of Contents | Next >>> |