Q(uick)BASIC Keyword: BINARY

Quick View

OPEN Statement File Modes

BINARY is used in an OPEN statement to specify binary-file mode

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.
Description/Parameter(s)

BINARY is used in an OPEN statement to specify binary file mode. In binary mode, you may read or write information to any byte position in the file using GET or PUT statements.

Description/Parameter(s)

In binary mode, you can read or write information to any byte position in the file using GET or PUT statements.