Process variants of the same method with different parameters in the Expression Handler - Connect_CDC - connect_cdc_mimix_share - 5.8

Connect CDC System Reference Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (MIMIX Share)
Version
5.8
Language
English
Product name
Connect CDC
Title
Connect CDC System Reference Guide
Copyright
2024
First publish date
2003
ft:lastEdition
2024-02-12
ft:lastPublication
2024-02-12T15:11:59.486869

The Expression Handler (similar to the Java language), employs a technique known as method overloading. This refers to the situation where there are several methods defined (variants of the same method) with the same name but have different parameters. The Connect CDC Expression Handler is able to distinguish that each variant is unique, even though the method name is the same, by using each variant's unique set of parameters, which includes the type of each parameter.

The following two examples show overloaded methods in the set of built-in methods:

Example 1:

                                              CHAR concat(CHAR string_one, CHAR string_two)
                                                CHAR concat(CHAR string_one, CHAR string_two, CHAR string_three)

Example 2:

CHAR replacechar(CHAR input_string, INTEGER search_point, INTEGER replace_point);
CHAR replacechar(CHAR input_string, INTEGER from_point, INTEGER to_point, INTEGER repl
CHAR replacechar(CHAR input_string, CHAR search_list, CHAR replace_point);

In both examples the methods are overloaded because the method is the same, but the set of input parameters is different.