home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH10LIST C:\UT2004"
- //Identifies the package
- //CH10_03LIST.uc
-
- class CH10_03LIST extends Commandlet;
- function int Main(string Args)
- {
- //#1
- local int iIntA, iIntB, iIntC, iIntD;
- iIntA = 5;
- iIntB = 5;
- iIntC = 4;
- iIntD = 4;
-
- log("*************");
-
- log(chr(13));
- log(chr(13));
- log("CH10_03LIST Boolean operations" $ chr(13) $ "");
- log(chr(13));
-
- //#2 Test using AND
- if(iIntA >= iIntD && iIntA == iIntB){
- log("1. 5 is greater or equal to 4 and 5 is equal to 5 : true.");
- }
-
- //#3 Test using OR
- if(iIntA >= iIntD || iIntC == iIntB){
- log("2. 5 is greater than or equal to 4 or 4 is equal to 5 : true.");
- }
-
- //#4 Test using exclusive OR
- if(iIntA >= iIntD ^^ iIntB == iIntC){
- log("3. 5 is greater than 4 Xor 5 is equal to 4 : exclusively true.");
- }
-
- log(chr(13));
- return 0;
- }
-