
Chapter 14. Statement Reference
262
Syntax:
OPEN "[drivename:]filename" AS [#] filenumber [RECORD
filelength]
Parameter:
filenumber
A numeric expression which returns a value from 1 to 16.
"[drivename:]filename"
A string expression.
filelength
An integer constant which has the value from 1 to 32767.
Description:
OPEN
opens a data file specified by
"[drivename:]filename"
and associ-
ates the opened file with
filenumber
for allowing I/O activities according to
filenumber
.
• The maximum number of files which can be opened at one time is 16 including
the bar code device file and communications device files.
•
"filename"
consists of a file name and a file extension.
The file name should be 1 to 8 characters long. Usable characters for the file
name include alphabet letters, numerals, a minus (-) sign, and an underline (_).
Note that a minus sign and underline should not be used for the starting character
of the file name. Uppercase and lowercase alphabet letters are not distinguished
from each other and both are treated as uppercase letters.
The file extension should be up to 3 characters long. It should be other than
.PD3, .EX3, .FN3, and .FLD and may be omitted (together with a period).
a.dat
master01.dat
• If you set
B:
to
[drivename]
, the specified file will be opened as a read-only
file; if you set
"A:"
or omit
[drivename]
, it will be opened as a read/write file.
File I/O statement
OPEN
Opens a data file for I/O activities.
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...