self lazarus / 21-General ---------------------------------------------------------------------- smitty · 2021-09-11 21:31 Reading https://wiki.freepascal.org/Self Code: [Select]Self is a keyword which can be used in instance methods to refer to the object on which the currently executing method has been invoked. Reserved word self used to represent an instance of the class in which it appears. Self can be used to access class members and as a reference to the current instance. procedure TForm1.FormCreate(Sender: TObject); begin   // Self stands for the TForm1 class in this example   Self.Caption := 'Test program';   Self.Visible := True; end; Therefore, presume I create my own Class named Math and I create methods add, subtract, divide, multiply.  If I create a new procedure Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure Math.FormCreate();Self.Add := a; I know that is a horrible example, but essentially Self means "if I am an instance of Class Math and want to use a method of Class Math, then I use the syntax 'Self.Method'" where Method must be in the Class. Thanks. ---------------------------------------------------------------------- marcov · 2021-09-11 21:40 Yeah, but keep in mind that the methods of the own class are visible by default. So self is mostly for special cases like when parameter names clash, within WITH statements etc.