Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EDT:Working with custom types"
(→Interface) |
(→Interface) |
||
Line 15: | Line 15: | ||
Here is an example Interface type, which is based on the service shown in [[#Service||Service]]: | Here is an example Interface type, which is based on the service shown in [[#Service||Service]]: | ||
+ | <source lang="java"> | ||
Interface IMyService | Interface IMyService | ||
Function calculate(theList INT[] IN) | Function calculate(theList INT[] IN) | ||
Line 21: | Line 22: | ||
// other function prototypes are here | // other function prototypes are here | ||
end | end | ||
+ | </source> | ||
= <br> Library = | = <br> Library = |
Revision as of 17:05, 13 February 2012
Your custom types are based on these EGL classifiers:
Contents
Delegate
Enumeration
ExternalType
Handler
Interface
Here is an example Interface type, which is based on the service shown in |Service:
Interface IMyService Function calculate(theList INT[] IN) returns(BIN (4,2)); // other function prototypes are here end
Library
Program
Record
Service
Service MyService // variables and constants can be here function calculate(myScore Int[]) returns (Decimal (4,2)) numberOfScores, i, mySum Int; numberOfScores = myScore.getSize(); for (i from 1 to numberOfScores by 1) mySum = myScore[i] + mySum; end return(mySum/numberOfScores); end // other functions are here end