Record Constructor Functions

A record constructor function is a function that creates and returns a record. For example, consider a record called Person with three fields: name, age, and children





Another use of record constructors is to create complex numbers, as in the example model AddComplex below. The declaration of the record Complex also gives rise to a record constructor function, which in the add function is called to create and return a value for the w output formal parameter. It is also called in the equation involving the variable c2.