home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH13LIST C:\UT2004"
- //Identifies the package
- //CH13_07LIST.uc
-
- class CH13_07LIST extends Commandlet;
- function int Main(string Args){
-
- // #1
- local string szRWE, szHDT, szSMF, szChar, szToPrint;
- local int iItr;
- iItr = 0;
-
- // Define information for the three authors
- //Ralph Waldo Emerson
- szRWE = " Ralph Waldo Emerson -- " $ Chr(10) $
- " The Apology, Uriel, Destiny" $ Chr(10) $
- " Each and All, The Eternal Pan" $ Chr(10) $
- " Hamatreya, Earth-Song, Brahma";
- //Henry D. Thoreau
- szHDT = " Henry D. Thoreau -- " $ Chr(10) $
- " Sympathy , Sic Vita" $ Chr(10) $
- " Friendship, Prayer" $ Chr(10) $
- " Independence, The Inward Morning" $ Chr(10) $
- " My Love Must Be as Free";
-
- //Sarah Margaret Fuller
- szSMF = " Sarah Margaret Fuller -- " $ Chr(10) $
- " Encouragement, Dryad Song" $ Chr(10) $
- " The Highlands, Winged Sphinx" $ Chr(10) $
- " The Passion-Flower";
-
- // #2
- //Generate a random number
- //Convert number to a character
-
- iItr = 1 + Rand(3);
- iItr += 96; //Make it 97, 98, 99;
- szChar = Chr(iItr);
-
- Log(Chr(10) $ " CH13_07LIST " $ Chr(10));
- //#3
- //Perform selections
- //if author a, then Emerson
- if(szChar == "a"){
- szToPrint = szRWE;
- }
- else{ //if not then Thoreau or Fuller
- if(szChar == "b"){ // if Fuller
- szToPrint = szSMF;
- }
- else{ //leaving only Thoreau, unnamed
- szToPrint = szHDT;
- }
- }
- Log( "(" $ szChar $ ")" $ szToPrint $ Chr(10));
-
- return 0;
- }
-