Type System
. A type system is a collection of rules for assigning type expressions to various parts of a program
. Different type systems may be used by different compilers for the same language
. In Pascal type of an array includes the index set. Therefore, a function with an array parameter can only be applied to arrays with that index set
. Many Pascal compilers allow index set to be left unspecified when an array is passed as a parameter
A type system is a collection of rules for assigning type expressions to various parts of a program. The implementation of a type system is a type checker. Different compilers or processors of the same language may use different type systems. For example, in the language definition of Pascal, the type of an array includes the index set of an array. This implies that a function with an array argument can only be applied to arrays with that particular index set. Many Pascal compiler implementations allow the index set to be left unspecified when an array is passed as an argument. Thus the type system used by these compilers differs from that specified in the language definition. Similarly, in the UNIX system, it is possible to use a more detailed type system than that used by the C compiler; it is done using the lint command.
|