Atari DOS 2.5: XF551 Owner's Manual page 79

Atari dos 2.5 disk drive
Table of Contents

Advertisement

In the sample INPUT/PRINT program listed
below,
Line 35
allows
the user to type in data on the keyboard (default
device).
In Line
70,
the INPUT statement
reads
the
contents
of the string from
the opened file
.
5 REM
~~CREATE
DATA
FILE~~
7
REM
~~OPEN
WITH
8 CREATES DATA
FILE~~
10 OPE
N
#1,8,O,
"D:WRITE
.
DAT"
20 DH1
~·lRT$(60)
30
?
"ENTER A SENTENCE
~lOT
MORE THAN
60 CHARACTERS
.
"
35
I
t·1PUT
~lRT$
38
RE~
•• WRITE
DATA
TO DISKETTE
40 PRINT
#l,WRTI
45 REM
~~CLO
SE
DATA
F
I
LE~~
50 CLOSE
#1
55 REM
~~OPEN
DATA FILE FOR
READ~~
58
REM
~
~
OPEN
WITH
4 IS A READ
ONLY~~
60 OPEN
#1,4
,
0,"D:WRITE.DAT"
65 REM
~
~
RE
A
D
DATA FROM
DISKETTE~~
70 INPUT
#l,WRTI
75 RE
M
~~PRINT
DATA~
~
80 PR UH
~lRT$
85 REM
~~CLOSE
DATA
FILE~~
90 CLOSE
# 1
PRINT
(PR.
or 7)
Format:
PRINT
\#
iocb
I
~;llexPl
..
J
lexpi
~
Examples:
10(1 PRINT
#2;
>-~,
'I'
100 PlUtH
#2; A$
10~)
?
C$
100 PRINT
""
-
"
....
( ,
-
,
. - . ,
This command writes an expression (whether string or
arithmetic) to the opened device with the same IOCB reference
number.
If no IOCB
number
is
specified,
the system writes the expression
to the screen
,
which
is the default
device.
If the
information
is
directed
to a device that is not
open,
ERRO R-133 displays
on
the
screen
.
69

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xf551

Table of Contents