home *** CD-ROM | disk | FTP | other *** search
/ UnrealScript Game Programming All in One / UnrealScriptGameProgrammingAllInOne.iso / UGPAIOListings / UGPAIOListingsCh09 / CH09LIST / Classes / CH09_04LIST.uc < prev    next >
Encoding:
Text File  |  2006-01-28  |  1.2 KB  |  43 lines

  1.   // %PARAMETERS = "CH09LIST C:\UT2004"
  2.   //  Identifies the package
  3.   //  CH09_04LIST.uc
  4.  
  5.  
  6.   class CH09_04LIST extends Commandlet;
  7.  
  8.     function int main(string args){
  9.  
  10.     // #1
  11.     // Declaration of floats
  12.       local float rEarthToMoon;
  13.       local float rAgeOfSolarSystem;
  14.       local float rAgeOfKnownUniverse;
  15.     // #2
  16.     // Use of scientific notation to initialize
  17.     //identifiers
  18.       rEarthToMoon = 3.84401e6;
  19.       rAgeOfSolarSystem = 4.6e9;
  20.       rAgeOfKnownUniverse = 16.5e9;
  21.  
  22.     // #2
  23.       log("CH09_04LIST");
  24.       log("====Display of Data from Scientific Notation=====");
  25.  
  26.       log("Distance from moon to earth: "
  27.                                  @ rEarthToMoon @  "kilometers.");
  28.       log("=================================================");
  29.  
  30.       log("Age of the solar system:     "
  31.                                  @ rAgeOfSolarSystem @
  32.                                                     "years.");
  33.       log("Age of the known universe:   "
  34.                                  @ rAgeOfKnownUniverse @
  35.                                                     "years.");
  36.       log("=================================================");
  37.     return 0;
  38.   }
  39.  
  40.  
  41.  
  42.  
  43.