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 (File I/O) Statement QuickSCREEN
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
OPEN - a file I/O statement that enables I/O to a file or device
Syntax
OPEN file [FOR mode] [ACCESS access] [lock] AS [#]filenum [LEN=reclen]
■ file is a string expression that specifies an optional device name,
followed by a file name or path name
■ mode is one of the following keywords:
RANDOM Read or write from a random- │ INPUT Read only from sequential file
access file (the default) │ OUTPUT Write to a sequential file
BINARY Read or write from a binary │ APPEND Write to the end of a
file │ sequential file
■ access and lock are ◄Details► used only in a networking environment
■ filenum is an integer expression whose value is between 1 and 255
■ reclen defaults to 128 for random-access files, to 512 for sequential
files, and is not needed at all for binary files
See Also ◄FREEFILE►
Other Uses of the OPEN Keyword
OPEN mode,[#]filenum,file[,reclen] - an alternate syntax (see ◄Details►)
◄OPEN COM► - to open a communications channel