Method Invocation

Syntax

variable := method_name ( arguments[,...n] )

Parameters

Description

Method invocation allows built-in methods to be executed independently of processing cycles. It also allows execution of non-built-in methods. Methods can also have a return value which can be assigned to a qualifier.

Whitespace

There must be no whitespace between a method name and the opening parenthesis of its parameter list.

For example, the following invocation is valid:

MyMethod(Parameter1, Parameter2)

but this is not:

MyMethod (Parameter1, Parameter2)

The presence of white space between a method name and the opening parenthesis of its parameter list might result in a syntax ambiguity that might not be resolved until semantic parsing, whereupon it will cause an error.

It is also possible that the ambiguity might be resolved in a way which is inconsistent with its original intention, due to the overloading or masking of names in the application model, but which is still valid in the syntactic and semantic context. If this is the case, it might compile successfully but will cause the application to behave unexpectedly at runtime.

Scope

Methods can only be invoked within their scope. Methods that are members of the current class do not need to be qualified, but accessible members of other classes must be qualified to avoid ambiguity. Refer to Qualifiers for more information on qualification.

Examples

Example 1

MyResult := MyMethod(A, 123, C)

Example 2

CustRecord := Cust.StaticGetCustomer(CustName)

Example 3

CustRecord := ThisCust.NonStaticGetCustomer(CustName)

Example 4

AVoidReturnMethod()