Q(uick)BASIC Keyword: RANDOM
Quick View
OPEN Statement File Modes
An optional keyword in the OPEN statement, RANDOM specifies random-access
Worth knowing
Useful and cross-version information about the programming environments of QBasic and QuickBasic.
Description/Parameter(s)
The APPEND, BINARY, INPUT, OUTPUT, and RANDOM keywords are used in the OPEN statement to specify file modes. INPUT, OUTPUT, and RANDOM are also used in the OPEN COM statement.
- APPEND specifies that the file is to be opened for sequential output and sets the file pointer to the end of the file. A PRINT # or WRITE # statement then extends (appends to) the file.
- BINARY specifies a binary-file mode. In binary mode, you can read or write information to any byte position in the file using GET or PUT statements.
- INPUT specifies that the file is opened for sequential input.
- OUTPUT specifies that the file is opened for sequential output.
- RANDOM specifies that the file is opened in random-access file mode.
RANDOM is the default file mode.
See also: