home *** CD-ROM | disk | FTP | other *** search
/ UnrealScript Game Programming All in One / UnrealScriptGameProgrammingAllInOne.iso / UGPAIOListings / UGPAIOListingsCh13 / CH13LIST / Classes / CH13_05LIST.uc < prev    next >
Encoding:
Text File  |  2006-02-06  |  1.6 KB  |  57 lines

  1. // %PARAMETERS = "CH13LIST C:\UT2004"
  2. //Identifies the package
  3. //CH13_05LIST.uc
  4.  
  5. class CH13_05LIST extends Commandlet;
  6. function int Main(string Args){
  7.   //#1
  8.    local int iLines, iCheck;
  9.    local string  szFirstName, szLastName, szTitle;
  10.    local Array<string> rgThought;
  11.  
  12.    szFirstName = "   Christopher";
  13.    szLastName =  "Cranch";
  14.    iLines = 0; iCheck = 0;
  15.    szTitle = "Gnosis";
  16.  
  17.   //#2
  18.    rgThought[0] = Chr(10) $ szFirstName @ szLastName $ Chr(10)
  19.                       @ "      " @ szTitle @ Chr(10);
  20.    rgThought[1] =
  21.       "   Thought is deeper than all speech,"   $  Chr(10)  $
  22.       "      Feeling deeper than all thought"   $  Chr(10);
  23.    rgThought[2] =
  24.       "   Souls to souls can never teach"       $  Chr(10)  $
  25.       "      What unto themselves was taught."  $  Chr(10)  $
  26.       "             . . .                       ";
  27.  
  28.    rgThought[3] =
  29.    "   Perry Miller, ed. The American Transcendentalists"
  30.                                           $  Chr(10)  $
  31.    "   (Baltimore: Johns Hopkins U. Press, 1957), p. 262.";
  32.  
  33.    //-------------------------------------------------------
  34.    log(Chr(10) $ "   CH13_05LIST" $ Chr(10));
  35.  
  36.    //#3
  37.    if(szLastName == "Cranch" &&  iLines == iCheck){
  38.       Log(rgThought[iCheck]);
  39.    }
  40.  
  41.   // #4
  42.    if( szLastName == "Cranch" &&  iLines++ == iCheck++){
  43.       Log(rgThought[iCheck]);
  44.    }
  45.  
  46.    if( szLastName == "Cranch" &&  iLines++ == iCheck++){
  47.       Log(rgThought[iCheck]);
  48.    }
  49.  
  50.    if( szLastName == "Cranch" &&  iLines++ == iCheck++){
  51.       Log(rgThought[iCheck]);;
  52.    }
  53.  
  54.  
  55.    return 0;
  56. }
  57.