DataBasic Reference > DataBasic Objects > DataBasic Server Objects Operations > Execute a Special Method

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

Execute a Special Method (dbo_execute_special_method.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

Execute a Special Method

Special methods supplement the DataBasic language to provide additional functionality specific to object orientated languages. Special methods always start with a % character to uniquely identify them from a language object method.

In general special methods require an object to operate on (the only exception is %CONNECT). However most special methods can use the default connection object (created by the first %CONNECT statement).

Special method names are case insensitive.

Syntax

{Object->} %method()

{Object->} %method(key {,ParameterList})

Syntax Elements

Object DBO variable name
method

The object method name that is to be executed.

-> The object operator.
ParameterList One or more expressions, separated by commas, representing actual values to be passed into the method.

Comments

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

Examples

Obj = Con -> %New(String, "My String")

Create a new string object on connection Con and assign a reference to Obj

Obj = %New(String, "My String")

Create a new string object on the default connection and assign a reference to Obj

Con -> %import(java.io)

Add java.io.* to the list of imports on the connection Con

%import(java.io)

As above but for the default connection.

RealityV15.1 (MoTW) Revision 7Comment on this topic