Calling Special Methods

Special methods supplement the DataBasic language to provide additional functionality specific to object oriented programming. Special methods always start with a % character to uniquely distinguish them from a language object method.

Special method names and their keywords are case insensitive.

Syntax

connection->%method(library)

connection->%method(class{, parameter-list})

connection->%method({keyword{, parameter-list}})

object->%method({keyword{, parameter-list}})

Syntax elements

methodA special method name.

connectionA connection object.

objectAn expression that evaluates to an object.

libraryAn object-oriented language library.

classA class name.

keywordA keyword that modifies the operation of the method.

parameter-listOne or more expressions, separated by commas, representing values to be passed into the method.

Comments

As calling a special method is syntactically an expression, the method result can be used in place of a single element within a DataBasic statement.

Examples

See the descriptions of each of the DataBasic Special Methods for specific examples.