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.
Reality V15.2 Online Documentation (MoTW) Revision 3
Execute a Special Method (dbo_execute_special_method.htm)
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.
{Object->} %method()
{Object->} %method(key {,ParameterList})
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. |
As calling a method is syntactically an expression, the method result can be used in place of a single element within a DataBasic statement.
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.