Please don't say, we'll never find a way...
And tell me all my love's in vain.
- Eric Clapton and Jim Gordon
The Method Call statement invokes an Aztec method. The method call is not executed as part of an expression; it is a standalone statement which only calls a single method. The following table shows the syntax for the method call statement.
♦ The method call is the entire statement.
♦ The method being called can return a value, but it is ignored.
♦ This is the only place where a method that does not return a value can be called.
♦ The first usage calls the method named MethodName, which has no arguments. Depending on context, MethodName could be an instance method being called from another method within the same class, or it could be a global (module level) method. Even though there are no arguments, the parentheses must be used.
♦ The second usage calls the method named MethodName passing it a single argument, Arg1. ObjectInstance is an instance of a class (new<ClassName>) that contains the MethodName "instance" method, or the method belongs to one of the classes that the "ObjectInstance" class is derived from. The data type for the argument Arg1 must match the first argument for MethodName.
♦ The third usage calls the method named MethodName passing it two arguments, Arg1 and Arg2. MethodName is a "shared" method of "ClassName". The data types for arguments Arg1 and Arg2 must match the first two arguments for MethodName.
♦ The method call statement can be used at the module level and class level for compile-time logic, and at the method level for run-time logic.It can also be used from within a "compiler" method for compile-time logic
♦ If the method call statement is used at the module or class level, the method identifier must be marked with the ‘compiler’ keyword and each term in the expression must either be a constant or also marked with ‘compiler’.
♦ If the method call statement is used at the method level, the method identifier being called must not be marked with the ‘compiler’ keyword, unless the method where the method call is being made is also a 'compiler' method. In that case, the method being called must also be marked as 'compiler'.