<p>How do I stop a function/procedure in a superclass from been overridden in a subclass in Delphi (2007)?</p>

<p>I want to mark it so it can not be altered, I believe there is a final keyword but can not for the life of me find the documentation for it, so I am not 100% sure that's what I need.</p>

The keyword is
```
final
```
as you thought. See
http://dn.codegear.com/article/34324
and
http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311
. Also you can mark your class as sealed to prevent anyone from inheriting from it. You need a Delphi version higher than 7.
```
```
type
  TSomeClass = class
  protected
    procedure SomeVirtualMethod; virtual;
  end;

  TOtherClass = class(TSomeClass)
  protected
    procedure SomeVirtualMethod; override; final;
  end;
```
```