Difference between revisions of "Method"
From Lazarus wiki
Jump to navigationJump to search (In static methods Self is not defined) |
(Deleted category because category mentioned in template) |
||
Line 7: | Line 7: | ||
In class methods it identifies the <syntaxhighlight lang="pascal" enclose="none">object</syntaxhighlight>/<syntaxhighlight lang="pascal" enclose="none">class</syntaxhighlight> type itself. In static methods <syntaxhighlight lang="pascal" enclose="none">Self</syntaxhighlight> is not defined. | In class methods it identifies the <syntaxhighlight lang="pascal" enclose="none">object</syntaxhighlight>/<syntaxhighlight lang="pascal" enclose="none">class</syntaxhighlight> type itself. In static methods <syntaxhighlight lang="pascal" enclose="none">Self</syntaxhighlight> is not defined. | ||
In instance methods <syntaxhighlight lang="pascal" enclose="none">self</syntaxhighlight> identifies the very instance. | In instance methods <syntaxhighlight lang="pascal" enclose="none">self</syntaxhighlight> identifies the very instance. | ||
− | |||
− |
Revision as of 16:26, 25 May 2018
│
English (en) │
français (fr) │
русский (ru) │
A method is a routine that is associated with an object
or class
.
self identifier
Inside method definitions the special identifier is available.
In class methods it identifies the object
/class
type itself. In static methods Self
is not defined.
In instance methods self
identifies the very instance.