home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH09LIST C:\UT2004"
- //Identifies the package
- //CH09_02LIST.uc
-
- class CH09_02LIST extends Commandlet;
-
- function int main(string args){
- //#1
- //local int 1forMe; //Generates an error; don't start with numbers
- //local int forMe1; //Generates a warning; don't end with numbers
- //local int forMe?; //Generates an error; don't use punctuation
- //local int _forMe; //Okay; the underscore might make sense
- //local int for?Me; //Generates an error; don't punctuate
-
- // #2
- // Declaration of integer identifiers
- // The scope is local
- local int iDateOfRev;
- local int iOrwellianDate;
- local int iMysticalNum;
- local int iDozen;
- local int iBigNumber;
- local int iUnity;
- local int iZero;
-
- // #3
- //Definition or initialization of the
- //identifiers
- //Assignment of values
-
- iBigNumber = 2147483647;
- iDozen = 0;
- iUnity = 0;
- iZero = 0;
- iMysticalNum = 666;
- iOrwellianDate = 1984;
- iDateOfRev = 0;
-
- // #4
- // Alter and display values
- log("CH09_02LIST");
- iDateOfRev = 1776;
- log ("American revolution: " $ iDateOFRev);
- log ("Year of totalitarian society: " $ iOrwellianDate);
- log ("Mystical number: " $ iMysticalNum);
- iDateOfRev = 1821;
- log ("Year of Bolivian American revolution: " $ iDateOFRev);
- iDateOfRev = 1792;
- log ("Year of French revolution: " @ iDateOFRev);
- log ("Big Number: " @ iBigNumber);
- return 0;
- }
-
-
-
-
-