home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH10LIST C:\UT2004"
- //Identifies the package
- //CH10_08LIST.uc
-
- class CH10_08LIST extends Commandlet;
-
- function int Main(string Args)
- {
- //#1
- local int iIntiger, iControl, iCount;
- local int fByte;
- local string szNumbers;
- local float rReal;
-
- iIntiger = 1;
- fByte = 1;
- rReal = 1;
- iControl = 6; iCount = 0;
-
- log("*************");
- log(Chr(10) @ " CH10_08LIST Converting numbers to strings"
- $ Chr(10));
- //#2
- //Boolean
- szNumbers = " ";
- szNumbers @= false;
- szNumbers @= true;
- log(" A - Boolean false and true as a string:" @ szNumbers);
-
- //Byte
- szNumbers = " ";
- szNumbers @= fByte;
- //prefix incremental\
- szNumbers @= ++fByte;
- szNumbers @= ++fByte;
-
- log(" B - A series of bytes of as a string:" @ szNumbers);
-
- //#3
- //Integer - explicit and implicit casts
- szNumbers = " ";
- szNumbers @= string(iIntiger);
- iIntiger++;
- szNumbers @= string(iIntiger);
- log(" C - Two integers as a string:" @ szNumbers);
-
- //#4
- //Float
- szNumbers = " ";
- rReal = float(iIntiger++);
- szNumbers @= rReal;
- rReal = float(iIntiger++);
- szNumbers @= rReal;
- rReal = float(iIntiger++);
- szNumbers @= rReal;
-
- log(" D - A series of real numbers as a string:"
- @ Chr(10) @ szNumbers);
-
- return 0;
- }
-