|
Introduction What's a type? Values of type boolean Boolean operators Using parentheses Precedence of boolean operators Boolean tyro

What's a type?

Yes!
A type is a set of values together with operations on them.

 

For example, the mathematical type "integer" contains the set of integers

{..., -1, -2, -1, 0, 1, 2, 3, ...}

together with operations +, -, *, /, <, <=, etc.

and the "natural numbers", or "nat", consists of the nonnegative integer

{0, 1, 2, 3, ...}

together with operations +, -, *, /, <, <=, etc.

 
|
|
  
© 2002 Copyright Cornell University