Difference between revisions of "Method"
From Free Pascal wiki
Jump to navigationJump to search (remove Category:Control Structures; add →self identifier: ; more concise definition) |
(In static methods Self is not defined) |
||
Line 4: | Line 4: | ||
== self identifier == | == self identifier == | ||
− | Inside method definitions the special identifier <syntaxhighlight lang="pascal" enclose="none"> | + | Inside method definitions the special identifier is available. |
− | + | 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. | ||
[[Category:Pascal]] | [[Category:Pascal]] |
Revision as of 16:22, 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.