CHR$1321
PRINT
prints 40. The PRINT TAB statement moves the cursor to position 40,
therefore, POS(0) returns the value
40.
(However, since a blank
is
inserted before the
"4"
to accommodate the sign, the
"4"
is
actually
at position 41).
Sample Program
150
CLS
160
A$
= INKEY$
170
IF
A$
=
""
THEN
1
60
180
IF
POSIXI
70
THEN
IF
A$
THEN
A$
= CHR$1131
190
PRINT A$i
200
PRINT A$;
210
GOTO
160
This program lets you use your printer
as
a typewriter (except that
you cannot correct mistakes). Your computer keyboard
is
the
typewriter keyboard. The program will keep watch at the end of a line
so that
no
word
is
divided between two lines.
GNTdata,
...
Statement I
/-
Prints numeric or string data
on
the display.
BASIC prints the values of the data items you list
in
this statement.
You may separate the data items
by
commas or semicolons. If you
use commas, the cursor automatically advances to the next tab
position before printing the next item. (BASIC divides each line into
five tab positions,
at
columns
0,
16,
32,
48, and 64).
If
you use
semicolons,
it
prints the items without any spaces between them.
A semicolon or comma at the end of a line causes the next PRINT
statement to begin printing where the last one left off.
If
no
trailing
punctuation
is
used with PRINT, the cursor drops down to the
beginning of the next line.
Single-precision numbers with six or fewer digits that can
be
accurately represented
in
ordinary (rather than exponential) format,
2-139