Openin; Openout - AMSTRAD cpc 6128 User Instruction

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

Advertisement

COMMAND: GOes to a BASIC SUB-routine when there is a free slot in the given
Sound Queue. The <channel> should be an integer expression yielding one of the
values:
1: for channel A
2: for channel B
4: for channel C
Further information concerning sound will be found in part 2 ofthe chapter entitled
'At your leisure .... '.
Associatedkeywords: RETURN, SOUND, SQ
OPENIN
OPE N I N dilename>
10 REM OPEN an INput file from disc
20 OPENIN "datafi le":INPUT #9,a,a$
30 CLOSEIN:PRINT "The 2 values are:"
40 PRINT:PRINT a,a$
run
COMMAND: 0 PENs an I Nput file from disc, for use in the current program. The
I Nputfileto 0 PEN must be an ASCII file.
The above example will only work after you have created the file shown in the next
example (under 0 PEN 0 U
T).
Associatedkeywords: C LO SE I N, EO F
OPENOUT
OPE N 0 U T <filename>
10 REM OPEN an OUTput file to disc
20 INPUT "give me a number variable";a
30 INPUT "give me a string variable";a$
40 OPENOUT "dataf i le"
50 WRITE #9,a,a$
60 CLOSEOUT:PRINT "Data saved onto disc"
run
COMMAND: 0 PEN san 0 U T put file to disc.
Associated keywords: C LOS EO U T
Complete List of Keywords
Chapter 3 Page 53

Advertisement

Table of Contents
loading

Table of Contents