20091123-Primitives-III

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

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

CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 [email protected]

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

View Full Document
Agenda Today: Primitives operator types floating point mixing types type casting and coercion wrapper classes Coming up: More control structures
„+‟ 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

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

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

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

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

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

View Full Document
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
Ask a homework question - tutors are online