A user wants to perform a different operation on an array type and the function can be overloaded but the parameter is of same base type. How to do the same by using a single function?
A user wants to perform a different operation on an array type and the function can be overloaded but the parameter is of same base type. How to do the same by using a single function? Correct Answer By using conditional statement with ‘LENGTH attribute
Since the parameter is of same base type, it is just that it has different length. So, there is no need to overload the function. It can be defined in a single function only by using conditional statements. For example, one can do it like shown below: IF(parameter’LENGTH =n) THEN do_this; ELSE do_this
মোঃ আরিফুল ইসলাম
Feb 20, 2025