Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
OPEN Statement (File I/O)
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Enables I/O to a file, device, or ISAM table (ISAM available in Professional
Edition only).
OPEN file$ [FOR mode][ACCESS access][lock] AS [#]filenumber% [LEN=reclen%]
OPEN database$ FOR ISAM tabletype tablename$ AS [#]filenumber%
■ file$ File name (may include path)
■ database$ ISAM database file name (may include path)
■ mode RANDOM | BINARY | INPUT | OUTPUT | APPEND
■ tabletype Name of a type of table defined using TYPE
■ tablename$ ISAM table name
■ access READ | WRITE | READ WRITE
■ lock SHARED | LOCK READ | LOCK WRITE | LOCK READ WRITE
■ filenumber% Integer expression with a value between 1 and 255,
inclusive
■ reclen% For random-access files, the record length; for
sequential files, the number of characters buffered
See Also
◄ACCESS Clause in the OPEN Statement (File I/O)► ◄OPEN COM Statement►
◄OPEN Statement (File I/O) Alternate Syntax► ◄CLOSE Statement►
◄FREEFILE Function► ◄TYPE Statement►