home *** CD-ROM | disk | FTP | other *** search
/ UnrealScript Game Programming All in One / UnrealScriptGameProgrammingAllInOne.iso / UGPAIOListings / UGPAIOListingsCh18 / CH18LIST / Classes / CH18_02LIST.uc < prev    next >
Encoding:
Text File  |  2006-02-22  |  1.3 KB  |  39 lines

  1. // %PARAMETERS = "CH18LIST C:\UT2004"
  2. //Identifies the package
  3. //CH08_02LIST.uc
  4. class CH18_02LIST extends Commandlet;
  5. function int Main(string Args)
  6. {
  7.   //#1
  8.   local SimpleMath firstMath;
  9.   firstMath = new class'SimpleMath';
  10.   Log(Chr(10)$ "SimpleMath Interface");
  11.  
  12.   //#2
  13.   Log(Chr(10)
  14.     $  "----------Services related to math ----------------" 
  15.     $ Chr(10));
  16.   Log("(Add 2 and 3)                   : "
  17.                                $ firstMath.addNums(2, 3));
  18.   Log("(Subtract 3 from 2)             : "
  19.                                $ firstMath.subtractNums(2, 3));
  20.   Log("(Multiply 2 by 3)               : "
  21.                                $ firstMath.multiplyNums(2, 3));
  22.   Log("(Divide 2 by 3)                 : "
  23.                                $ firstMath.divideNums(2, 3) );
  24.   Log("(Circumference for diameter 3)  : "
  25.                                $ firstMath.getCircumference(3));
  26.   Log("(Area for radius 3)             : "
  27.                                $ firstMath.getArea(3));
  28.   //#3
  29.   Log(Chr(10)$ "----------Services related to text processing -----"
  30.              $ Chr(10));
  31.   Log("(Capitalize 'math')             : "
  32.                                $ firstMath.makeCaps("math"));
  33.   Log("(Join 'Simple' and 'Math')      : "
  34.                                $ firstMath.joinwords("Simple", "Math"));
  35.  
  36.   return 0;
  37. }
  38.  
  39.