|
|
Line 1: |
Line 1: |
− | Your custom types are based on these EGL classifiers:
| |
| | | |
− | :[[#Delete|Delegate]], [[#Enumeration|Enumeration]], [[#ExternalType|ExternalType]], [[#Handler|Handler]],
| |
− | :[[#Interface|Interface]], [[#Library|Library]], [[#Program|Program]], [[#Record|Record]], [[#Service|Service]]
| |
− |
| |
− | = Delegate =
| |
− |
| |
− | = <br> Enumeration =
| |
− |
| |
− | = <br> ExternalType =
| |
− |
| |
− | = <br> Handler =
| |
− |
| |
− | = <br> Interface =
| |
− |
| |
− | = <br> Library =
| |
− |
| |
− | = <br> Program =
| |
− |
| |
− | = <br> Record =
| |
− |
| |
− | = <br> Service =
| |
− |
| |
− | <source lang="java">
| |
− | 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
| |
− |
| |
− |
| |
− | </source>
| |