ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PRINT Statement Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses the PRINT USING statement to illustrate the effect of
' different combinations of numeric-formatting characters.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Copy the code example below to the code window
' 3. Press F5 to run the example
 
 CLS                                ' Clear the screen
 PRINT USING "##.##"; .78
 PRINT USING "###.##"; 987.654
 PRINT USING "##.##   "; 10.2; 5.3; 66.789; .234
 PRINT USING "+##.##   "; -68.95; 2.4; 55.6; -.9
 PRINT USING "##.##-   "; -68.95; 22.449; -7.01
 PRINT USING "**#.#   "; 12.39; -.9; 765.1
 PRINT USING "$$###.##"; 456.78
 PRINT USING "**$##.##"; 2.34
 PRINT USING "####,.##"; 1234.5
 PRINT USING "##.##^^^^"; 234.56
 PRINT USING ".####^^^^-"; -888888
 PRINT USING "+.##^^^^"; 123
 PRINT USING "+.##^^^^^"; 123
 PRINT USING "_!##.##_!"; 12.34
 PRINT USING "##.##"; 111.22
 PRINT USING ".##"; .999