8new_subtyp_enum

8new_subtyp_enum - Introduction to Computers and...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Computers and Programming Lecture 8 Types values similarity of values and primitive operations Elementary types Composite Types Prof. I. K. Lundqvist Reading: FK pp. 115-151 Sept 17 2003 •Type –A set of –A set of primitive operations • Grouped into classes based on the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Elementary Types : Values are logically indivisible Composite Types : Values composed from components Type Classification Elementary Types Scalar Types Access Types Discrete Types Real Types Scalar Types relational operators are defined position number Scalar Types Discrete Types Real Types Integer Types Enumeration Types Fixed Point Floating Point •Ordered • Each value of a discrete type has a
Background image of page 2
Attributes of Scalar Types range of S. The value of this attribute is of the type of S. range of S Operations on Scalar Types the value in the type string on the scalar type S’Succ (Integer) : returns (Integer + 1) S’First denotes the lower bound of the S’Last denotes the upper bound of the S’Range is equivalent to the range S’First . . S’Last S’Min returns lower of two elements S’Max returns higher of two elements S’Value accepts a string and returns S’Image converts the value into a S’Pred and S’Succ – behavior depends S’Pred (Integer) : returns (Integer -1)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Subtypes •A subtype type. not
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/28/2012 for the course AERO 16.01 taught by Professor Markdrela during the Fall '05 term at MIT.

Page1 / 11

8new_subtyp_enum - Introduction to Computers and...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online