EasyManua.ls Logo

Husky Hunter - Page 268

Husky Hunter
499 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC FUNCTIONS
SECTION 5.16
OPEN
5.16. 12 Function OPEN opens file for I/O
OUTPUT
Syntax OPEN "file name" FOR APPEND AS file no.
INPUT
Example 10 OPEN
11
0UTFIL. TXT
11
FOR OUTPUT AS 1
This will open the file
11
0UTFIL.TXT
11
for output from a
Basic program as file number one.
or 10 OPEN
11
APPEND.TXT
11
FOR APPEND AS 3
This opens the file
11
APPEND.TXT
11
·as file number three. Any
data written to the file will be appended. MAXFILES must
have previously been set to a minimum of three.
or 10 OPEN "INPUT. TXT
11
FOR INPUT AS 4
The file is opened for input as file number four, this will
allow the data in the file to be read by a Basic program.
Remarks When a file is OPENed HUNTER's firmware automatically
performs a checksum generation on the file and compares it
to a value stored in the file directory, when the file was
last CLOSEd. Any inconsistency will result in a 'DSK
ERROR' being returned to the user.
VER.V09F
The OPEN statement parameter FOR has three options
OUTPUT ,APPEND and INPUT, they perform the following
functions:
OUTPUT : This will open a file for output. Any data that
is in the file will be lost.
APPEND: This will also open a file for output, but any
data that is output to the file will be added to the end of
the data that is already present.
INPUT : The file is opened for input. This will allow a
Basic program to read data from the file.
The file number cannot be greater than the number specified
in MAXFILES. If MAXFILES 3 has been specified the file
number cannot be greater than three.
PAGE 5 - 99