qbasic.hlp (Topic list)
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 Alternate Syntax
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
OPEN mode2$,[#]filenum%,file$[,reclen%]
 
    ■ mode2$      A string expression that begins with one of the
                  following characters and specifies the file mode:
                    O    Sequential output mode.
                    I    Sequential input mode.
                    R    Random-access file input/output mode.
                    B    Binary-file mode.
                    A    Sequential output mode. Sets the file pointer to
                         the end of the file and the record number to the
                         last record of the file. A PRINT # or WRITE #
                         statement extends (appends to) the file.
    ■ filenum%    A number in the range 1 through 255 that identifies
                  the file while it is open.
    ■ file$       The name of the file (may include drive and path).
    ■ reclen%     For random-access files, the record length in bytes.
                  For sequential files, the number of characters buffered.
 
    ■ QBasic supports this syntax for compatibility with programs written
      in earlier versions of BASIC.
 
See Also    OPEN