Jump to: navigation, search

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

(Interface)
Line 11: Line 11:
  
 
= <br> Handler  =
 
= <br> Handler  =
 +
 +
Here is an example Interface type, which is based on the service shown in “The Service classifier”:
  
 
= <br> Interface  =
 
= <br> Interface  =
 +
 +
Interface IMyService
 +
  Function calculate(theList INT[] IN)
 +
            returns(BIN (4,2));
 +
 +
  // other function prototypes are here
 +
end
  
 
= <br> Library  =
 
= <br> Library  =

Revision as of 16:03, 13 February 2012

Your custom types are based on these EGL classifiers:

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

Delegate


Enumeration


ExternalType


Handler

Here is an example Interface type, which is based on the service shown in “The Service classifier”:


Interface

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




Code snippets main page