20091123-Primitives-III

20091123-Primitives-III - CSE115: Introduction to Computer...

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

View Full Document Right Arrow Icon
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 [email protected]
Background image of page 1

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

View Full DocumentRight Arrow Icon
Agenda Today: Primitives operator types floating point mixing types type casting and coercion wrapper classes Coming up: More control structures
Background image of page 2
„+‟ is overloaded • „+‟ is just a name • „+‟ has different interpretations String concatenation integer addition •addition of two‟s complement numbers floating point addition addition of IEEE754 numbers
Background image of page 3

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

View Full DocumentRight Arrow Icon
type of „+‟ In the following expression, what is the type of „+‟? 5 + 2
Background image of page 4
mappings an operator / function maps from a domain set to a range set: DOMAIN RANGE
Background image of page 5

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

View Full DocumentRight Arrow Icon
„+‟ as int addition range is int domain is pairs of int • „+‟ has type int x int int DOMAIN int X int RANGE int
Background image of page 6
int values: 0, 1, -1, 2, - 2, … maximum int: 2147483647 = +2 (32-1) -1 minimum int: -2147483648 = -2 (32-1) operations: + - * / %
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2011 for the course CSE 115 taught by Professor Decker during the Fall '08 term at SUNY Buffalo.

Page1 / 14

20091123-Primitives-III - CSE115: Introduction to Computer...

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

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