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

  1.   // %PARAMETERS = "CH09LIST C:\UT2004"
  2.   //Identifies the package
  3.   //CH09_02LIST.uc
  4.  
  5.   class CH09_02LIST extends Commandlet;
  6.  
  7.     function int main(string args){
  8.         //#1
  9.     //local int 1forMe;     //Generates an error; don't start with numbers
  10.     //local int forMe1;     //Generates a warning; don't end with numbers
  11.     //local int forMe?;     //Generates an error; don't use punctuation
  12.     //local int _forMe;     //Okay; the underscore might make sense
  13.     //local int for?Me;     //Generates an error; don't punctuate
  14.  
  15.     // #2
  16.     // Declaration of integer identifiers
  17.     // The scope is local
  18.     local int iDateOfRev;
  19.     local int iOrwellianDate;
  20.     local int iMysticalNum;
  21.     local int iDozen;
  22.     local int iBigNumber;
  23.     local int iUnity;
  24.     local int iZero;
  25.  
  26.     // #3
  27.     //Definition or initialization of the
  28.     //identifiers
  29.     //Assignment of values
  30.  
  31.     iBigNumber = 2147483647;
  32.     iDozen = 0;
  33.     iUnity = 0;
  34.     iZero = 0;
  35.     iMysticalNum = 666;
  36.     iOrwellianDate = 1984;
  37.     iDateOfRev = 0;
  38.  
  39.     // #4
  40.     // Alter and display values
  41.     log("CH09_02LIST");
  42.     iDateOfRev = 1776;
  43.     log ("American revolution: " $ iDateOFRev);
  44.     log ("Year of totalitarian society: "  $ iOrwellianDate);
  45.     log ("Mystical number: " $ iMysticalNum);
  46.     iDateOfRev = 1821;
  47.     log ("Year of Bolivian American revolution: " $ iDateOFRev);
  48.     iDateOfRev = 1792;
  49.     log ("Year of French revolution: " @ iDateOFRev);
  50.     log ("Big Number: " @ iBigNumber);
  51.     return 0;
  52.   }
  53.  
  54.  
  55.   
  56.   
  57.