|Mode||Type||Method of Access|
|A||2||Sequential Output, Appending|
If a disk file is being opened for random I/O, len is taken as the length of the buffer. If len is zero, then the buffer length is IBMSECTOR (see io(inc)). Len is interpreted as an unsigned value: a negative len yields a buffer length of 65536 - len. For a tty, len is the number of seconds to wait for input. If len is zero, the wait is indefinite.
If name begins with the characters “pipe:”, a process is created with the shell command (see sh(1)) given by the remainder of name and a pipe (see pipe(2)) is created to the standard input and/or output of the process.
A pipe or tty may be open for two-way communication allowing both reading and writing.
Bopen creates an output file if it does not exist. If the file is a tty, its original state is recorded and changed if appropriate (see initty(io)). If the file is not a tty, a buffer is allocated. If the file is a disk file open for random I/O and a buffer of adequate length was allocated previously for the same purpose using the same fn, the buffer is reused. In any case, biotab[fn] is initialized and contains all the information necessary for maintaining the file (see io(inc)).
This function implements the OPEN statement.
Error 54 (Bad file mode) if mode is not null and does not begin with the appropriate character.
Error 55 (File already open) if a file is already open using fn.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber