Sign in Join
Wiki copytemporary

Method: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Method

OldNewLine
1+A **method** is a [[Routine|routine]] that is associated with an [[Object|object]] or [[Class|class]].
2+
3+## self identifier
4+
5+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.
6+
7+However, since static class methods are just “global” routines within the type's namespace, such methods do not know the `self` identifier. [¹](https://www.freepascal.org/docs-html/ref/refsu30.html)[²](https://www.freepascal.org/docs-html/ref/refsu22.html#x66-880005.5.2)
8+
9+## see also
10+
11+- [[Property|property]]
12+
13+---
14+*From the Free Pascal wiki, page "Method", as it stood on 2022-08-06 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history