Abstract type: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) m (→{{header|11l}}: Void) |
|||
Line 2,554: | Line 2,554: | ||
See [[#Delphi | Delphi]] |
See [[#Delphi | Delphi]] |
||
=={{header|PascalABC.NET}}== |
|||
<syntaxhighlight lang="delphi"> |
|||
type |
|||
MyAbstract = abstract class |
|||
public |
|||
procedure Proc1; abstract; |
|||
procedure Proc2; |
|||
begin |
|||
end; |
|||
end; |
|||
MyClass = class(MyAbstract) |
|||
public |
|||
procedure Proc1; override; |
|||
begin |
|||
end; |
|||
end; |
|||
begin |
|||
var a := new MyClass; |
|||
a.Proc1; |
|||
end. |
|||
</syntaxhighlight> |
|||
Abstract method is a virtual method. You must overload it in a subclass using an override modifier. |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |