10.07.2015 Views

Data Types & Type Checking - Ace

Data Types & Type Checking - Ace

Data Types & Type Checking - Ace

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.

<strong>Type</strong> <strong>Checking</strong>• Preliminary step: generalize the concept of operands andoperators to include:– subprograms as operators, and parameters as operands;– assignments as operators, and LHS & RHS as operands.• <strong>Type</strong> checking is the activity of ensuring that the operandsof an operator are of compatible types.• A compatible type is one that is either legal for theoperator, or is allowed under language rules to beimplicitly converted to a legal type:– This automatic conversion , by compiler-generated code, is calleda coercion.Lecture 0546

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

Saved successfully!

Ooh no, something went wrong!