Sometimes, however, it is helpful to group items of different types together into a single unit. For example, consider a real student record. On a student record, the firstname, lastname and address are ``text'' fields. The GPA, however, is a real number. The student number is an integer field, while the birthdate is a data field. It is helpful to see the entire record as one single object sometimes. For example, it is convenient to say ``make a copy of Joe's student record''. The alternative is to specify making a copy of every field that applies to Joe, which is tedious and error prone.
This chapter discusses the general concept, syntax and uses of records in Pascal. Most of the conceptual discussions apply to Pascal and most other modern programming languages, while the syntax and sample programs are more Pascal specific.