📄 testinheritedexpr.obs
字号:
unit testinheritedexpr;interface type tcitycounter=class(Tobject)public function
countrats(const pscity:string):integer;virtual;function countcheaptaxis:integer;virtual
;procedure foo;virtual;end;tlondoncounter=class(TCityCounter)public function countrats
(const pscity:string):integer;override;function countcheaptaxis:integer;override;
procedure foo;override;end;implementation function tcitycounter.countcheaptaxis:integer
;begin result:=-1;end;function tcitycounter.countrats(const pscity:string):integer
;begin result:=1000;end;procedure tcitycounter.foo;begin end;function tlondoncounter
.countcheaptaxis:integer;begin result:=inherited countcheaptaxis;end;function tlondoncounter
.countrats(const pscity:string):integer;begin result:=inherited countrats('London'
)*42;end;procedure tlondoncounter.foo;begin inherited;end;end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -