Difference between revisions of "EDT:Working with custom types"

From Eclipsepedia

Jump to: navigation, search
(Interface)
(Interface)
Line 14: Line 14:
 
= <br> Interface  =
 
= <br> Interface  =
  
The following Interface type reflects the service shown in [[#Service|Service]]:
+
The following Interface type reflects the Service type shown in [[#Service|Service]]:
 
<source lang="java">
 
<source lang="java">
 
Interface IMyService
 
Interface IMyService

Revision as of 18:19, 13 February 2012

Your custom types are based on these EGL classifiers:

Delegate, Enumeration, ExternalType, Handler,
Interface, Library, Program, Record, Service

Contents

Delegate


Enumeration


ExternalType


Handler


Interface

The following Interface type reflects the Service type 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[] in) 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




Code snippets main page