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

Connect CDC System Reference Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (MIMIX Share)
Version
Latest
Language
English
Product name
Connect CDC
Title
Connect CDC System Reference Guide
Copyright
2024
First publish date
2003
Last edition
2024-08-20
Last publish date
2024-08-20T21:40:14.000381

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.