Skip to content

Methods

A method is a procedure or function that is declared inside the class definition statement and performs an operation, typically on an instance of the class.

DataFlex supports three different kinds of methods:

  • Procedures: Perform discrete operations on the object or on behalf of the object.
  • Procedure Set: Perform discrete operations and then set some state or attribute of the object.
  • Functions: Perform a discrete operation and then return some state or attribute of the object.

Notes

Class methods are not like the global procedures and functions that are described in Global Procedures and Functions. Global procedures and functions are declared and called differently and are intended for a different purpose than class methods.

Read more about this in these Methods subtopics: