AMSTRAD cpc 6128 User Instruction page 398

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Floating dollar and pound signs may be included in the format - i.e. a currency sign
that will always be printed directly before the first digit of the number, even ifit does
not fill the complete format. This is achieved by the use of " $ $" and
"£ £"
in the
template.
PRINT USING "$$##";7
$7
PRINT USING "$$##";351
$351
PRINT USING "££####,.##";1234.567
£1,234.57
Note the rounding of the result.
The space before the result may be padded with floating asterisks by the use of "
* * "
in the template.
PRINT USING "**####.#";12.22
****12.2
This may be combined with the currency symbols, (and then only one currency
symbolis used) - i.e. "
* *
$ .... etc" or
"*
*
£ ....
etc".
A
"+"
at the start of the template specifies to always print the sign of the result
before the first digit. A "
+ "
at the end of the template prints a trailing sign.
A " - " can only be placed at the end ofthe format, and specifies that a trailing minus
sign be printed if the number is negative.
PRINT USING "+##";12
+12
PRINT USING "+##";-12
-12
PRINT USING "##+";12
12+
PRINT USING "##-";-12
12-
PRINT USING "##-";12
12
At your leisure ....
Chapter 9 Page 25

Advertisement

Table of Contents
loading

Table of Contents