How to resolve the algorithm Return multiple values step by step in the ECL programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Return multiple values step by step in the ECL programming language
Table of Contents
Problem Statement
Show how to return more than one value from a function.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Return multiple values step by step in the ECL programming language
Source code in the ecl programming language
MyFunc(INTEGER i1,INTEGER i2) := FUNCTION
RetMod := MODULE
EXPORT INTEGER Add := i1 + i2;
EXPORT INTEGER Prod := i1 * i2;
END;
RETURN RetMod;
END;
//Reference each return value separately:
MyFunc(3,4).Add;
MyFunc(3,4).Prod;
You may also check:How to resolve the algorithm Substring step by step in the Perl programming language
You may also check:How to resolve the algorithm Program termination step by step in the VBScript programming language
You may also check:How to resolve the algorithm Test integerness step by step in the Python programming language
You may also check:How to resolve the algorithm Ackermann function step by step in the XLISP programming language
You may also check:How to resolve the algorithm Currying step by step in the BQN programming language