7.3 Type Checking

A type is a set of values (e.g., int in C equals, left parenthesis, minus 2 to the power of 15, ellipsis, 2 to the power of 15 minus 1, right parenthesis.)2 and the permissible operations on those values (e.g., + and *). Type checking verifies that the values of types and (new) operations on them—and the values they return—abide by these constraints. For instance, consider the following C program:

A set of seven code lines in a C program.
Description
Continuation of the code in a C program, consisting of four lines.
Description

Data types for function parameters in C are not required in function definitions or function declarations (i.e., ...

Get Programming Languages: Concepts and Implementation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.