home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH10LIST C:\UT2004"
- //Identifies the package
- //CH10_01LIST.uc
-
- class CH10_01LIST extends Commandlet;
- function int Main(string Args)
- {
- //#1
- local int iIntegerNum;
- local byte bByteNum;
- local float rRealNum;
-
- iIntegerNum = 18;
- bByteNum = 25;
- rRealNum = 35.15;
-
- log("*************");
- log("CH10_01LIST Increment and Assignment operations" $ chr(13) $ "");
- log(chr(13));
- //#2 simple integers and bytes, but not floats
- log("Use of ++ and -- with integer: " @ iIntegerNum++
- @ iIntegerNum++ @ iIntegerNum++
- @ iIntegerNum--
- @ iIntegerNum-- @ iIntegerNum--);
-
- log("Use of ++ and -- with byte: " @ bByteNum++ @ bByteNum++
- @ iIntegerNum-- @ iIntegerNum--);
-
- //Not permitted
- log("Use of ++ and -- with byte float not allowed!");
- //log("Use of + to increment real: " @ rRealNum++);
-
- //#3 integers and bytes, and floats
- log("Use of += and -= with integer: " @ iIntegerNum += 2 @ iIntegerNum += 2
- @ iIntegerNum += 2 @ iIntegerNum += 2
- @ iIntegerNum -= 2 @ iIntegerNum -= 2
- @ iIntegerNum -= 2 @ iIntegerNum -= 2);
-
- log("Use of += and -= with byte: " @ bByteNum += 2 @ bByteNum += 2
- @ bByteNum += 2 @ bByteNum += 2
- @ bByteNum -= 2 @ bByteNum -= 2
- @ bByteNum -= 2 @ bByteNum -= 2);
-
- log("Use of += and -= with float: " @ rRealNum += 2 @ rRealNum += 2
- @ rRealNum += 2 @ rRealNum += 2);
-
- log("Use of += and -= with float: " @ rRealNum -= 2 @ rRealNum -= 2
- @ rRealNum -= 2 @ rRealNum -= 2);
- return 0;
- }
-
-