So I've been programming for 8 years now, and I've never thought about this before until now. If we have a simple unit with a class like this:


[pascal]Unit Example;

interface

type
TSomething = class(TObject)
private
//whatever
public
procedure SomeThingA;
procedure SomeThingB;
end;

procedure whatever;

implementation

//implementation of the procedures. None of the above procedures calls each other[/pascal]

My question is: if I use the Unit Example in a project and never uses the procedure whatever will the compiler be smart enough to not compile the procedure? And more interesting for me. If I use the class TSomething in a project but never uses procedure SomeThingB, will the compiler then compile procedure SomeThingB into the exe?