31.07.2013 Views

Adobe PDF

Adobe PDF

Adobe PDF

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Polymorphism - Universal<br />

Universal polymorphism is divided into<br />

two kinds:<br />

Parametric Polymorphism<br />

e.g. In Pascal / C NULL : forall(Y) Pointer(Y)<br />

Wait for more on this!<br />

Inclusion Polymorphism<br />

e.g. Subrange types in Pascal<br />

type minutes = 0..60;<br />

Given,<br />

5 : minutes; 5 : integer;<br />

More on this as well!<br />

4/11/2008 Sundar B., BITS, Pilani. CS C362 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!