Print Spc; Print Tab - AMSTRAD cpc 6128 User Instruction

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

Advertisement

Note that when a semicolon; is used to tell the computer to print the following <print
item> next to the preceding item, BASIC first checks to see if the following <print
item> can fit onto the same line. Ifnot, it will be printed on a new line regardless of the
semicolon.
Note also that when a comma, is used to tell the computer to print the following
<print item> in the next print zone, BASIC first checks to see that the preceding item
has not exceeded the length of the current zone. If it has, the following <print item> is
printed in a further zone.
PRINTSPC
PRINT TAB
PR I N T [# <stream expression> ,][ <list of: <print item>][; ]
[S P C ( <integer expression> ) ][ <list of: <print item> ]
PR I N T[# <stream expression> , ][<list of:<printitem>][;]
[T A B ( <integer expression> ) ][ <list of: <print item>]
10 PRINT "this is spc function"
20 FOR x=6 TO 15
30 PRINT SPC(5)"a";SPC(x)"b"
40 NEXT
50 PRINT "this is tab function"
60 FOR x=6 TO 15
70 PRINT TAB(5)"a";TAB(x)"b"
80 NEXT
run
S P C prints the number of spaces specified in the <integer expression>, and will print
any following <print item> immediately next to the spaces, (assuming that the
following <print item> will fit onto the line). Hence it is not necessary to terminate
S
P
C
with a semicolon.
TAB prints the number of spaces relative to the left edge of the text window, and will
print any following <print item> immediately next to the spaces, (assuming that the
following <print item> will fit onto the line). Hence it is not necessary to terminate
TAB with a semicolon. If the current position is greater than the required position,
then a carriage return is executed, followed by spaces to reach the required position
on the next line.
Chapter 3 Page 60
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents

Save PDF