home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH18LIST C:\UT2004"
- //Identifies the package
- //CH08_03LIST.uc
- class CH18_03LIST extends Commandlet;
- function int Main(string Args)
- {
- //#1
- local string szTest;
- local Decoration firstDecor;
-
- szTest = "Electra";
- firstDecor = new class'Decoration';
- Log(Chr(10)$ " Decoration Demonstration of Keywords" $ Chr(10));
-
-
- //#2 Use of static form of a function - no identifier
- Log(" 1. makeWord(2) : 'static' call to make a string a number ");
- Log(" : " $ class'Decoration'.static.makeWord(2));
- Log(Chr(10));
- //#3 Change the string
- Log(" 2. addDecoration() : use of 'out' ");
- Log(" Before change : " $ szTest);
- firstDecor.addDecoration(szTest, "*");
- Log(" After change : " $ szTest);
- Log(Chr(10));
- //#4 Force two integers into a string
- Log(" 3. Use of 'coerce' : " $ firstDecor.joinTerms(1, 2));
- Log(Chr(10));
- //#5 Use an optional paramater
- //Don't use it
- Log(" 4. Use of 'optional' : ");
- Log(" No arugment given : " $ firstDecor.addSpace("Orestes"));
- Log(Chr(10));
- //Now use it
- Log(" 5. Use of 'optional' : ");
- Log(" Argument of 3 : " $ firstDecor.addSpace("Orestes", 3));
-
- return 0;
- }
-
-