Jump to: navigation, search

EDT:Working with custom types

Revision as of 10:55, 10 February 2012 by Margolis.us.ibm.com (Talk | contribs) (New page: Your custom types are based on these EGL classifiers: :Delegate, Enumeration, ExternalType, Handler, :[[#Interface|Interface]...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Your custom types are based on these EGL classifiers:

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

Delegate


Enumeration


ExternalType


Handler


Interface


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