A method must have a return type. The return type declares the type of the return value. There are two basic types: primitive types and reference types.
•Primitive Types: Every language (Java, C++, Visual Basic, CORBA IDL Properties for a Class Method, and so on) has a standard set of primitive types. In the Return Type property of a method, you are provided with a filtered list that shows simply the primitive types of the language declared for that class.
•Reference Types: Reference types are class types, interface types, and array types. To select a reference type, place your cursor in the Return Type cell for a method, right-click, and select Choices. You are provided with a dialog that presents all classes in the encyclopedia, which you can select and drag into the class methods return type cell.
Return Pre-Type
const
Specifies that a parameter is a constant.
Volatile
Specifies that the variable is vulnerable to thread access. It is read from memory each time it is used and stored to memory after each occasion, to ensure data integrity. You cannot declare a variable to be both final and volatile.
ByRef
Specifies that the caller can modify the variable's value. The syntax is: ..., ByRef parameter, ... Used primarily in the VB language.
Optional ByRef
Specifies that a parameter is optional, and it is passed by reference. Used primarily in the VB language.
ByVal
Specifies that a parameter is passed by value rather than by reference. This implies that the caller cannot modify that variable's value. The syntax is: ..., ByVal parameter, ... Used primarily in the VB language.
Optional ByVal
Specifies that a parameter is optional, and it is passed by value. Used primarily in the VB language.
Return Post-Type
*
Specifies that a variable is passed by pointer. Used in the C++ language.
**
Specifies that a variable is passed by a pointer to a pointer. Used in the C++ language.
&
Specifies that a variable is passed by reference.
()
Specifies that a parameter is passed by value. The syntax is: ..., (parameter), ... An example is: ShowDialog (i), which calls a function ShowDialog and passes it the variable 'i', by value.
Volatile
Specifies that the variable is vulnerable to thread access. It is read from memory each time it is used and stored to memory after each occasion, to ensure data integrity. You cannot declare a variable to be both final and volatile.
* Const
Specifies that a parameter is a constant and passed by pointer. Used in the C++ language.
** Const
Specifies that a parameter is a constant and passed by a pointer to a pointer. Used in the C++ language.
& Const
Specifies that a parameter is a constant passed by reference. Used in the C++ language.
* Volatile
Specifies that a parameter is volatile and passed by pointer. Used in the C++ language.
** Volatile
Specifies that a parameter is volatile and passed by a pointer to a pointer. Used in the C++ language.
& Volatile
Specifies that a parameter is volatile and passed by reference.