Object oriented

self

The current object, from inside a class.

Syntax

self.<field>
call self.<method>();

How she behaves

  • Read or redefine a field: self.age, redefine self.age is self.age + 1;
  • Call another method on the same object: call self.FormatName();
  • self is for the inside of the class. Callers use the object name instead.

Example

define func Birthday();
    redefine self.age is self.age + 1;
end;

See also