Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EDT:Working with custom types

Revision as of 18:20, 13 February 2012 by Unnamed Poltroon (Talk) (Interface)

Your custom types are based on these EGL classifiers:

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

Delegate


Enumeration


ExternalType


Handler


Interface

The following Interface type reflects the MyService 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

Back to the top