Difference between revisions of "Method"
From Lazarus wiki
Jump to navigationJump to search (Deleted category because category mentioned in template) |
|||
Line 4: | Line 4: | ||
== self identifier == | == self identifier == | ||
− | Inside method definitions the special identifier | + | Inside method definitions the special identifier <syntaxhighlight lang="pascal" enclose="none">self</syntaxhighlight> is available. |
− | + | In static or class methods it identifies the <syntaxhighlight lang="pascal" enclose="none">object</syntaxhighlight>/<syntaxhighlight lang="pascal" enclose="none">class</syntaxhighlight> type itself. | |
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 14:46, 26 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 self
is available.
In static or class methods it identifies the object
/class
type itself.
In instance methods self
identifies the very instance.