BASIC File IO Statements and Functions - fvdhoef/aquarius-plus GitHub Wiki

OPEN

Format: OPEN filespec FOR mode AS numvar

Action: Opens a file for input and/or output.

  • filespec specifies the file to be opened.
  • mode specifies how the file will be opened. Valid options are:
    • INPUT - Opens file for reading only.
    • OUTPUT - Opens file for writing only.
    • APPEND - Opens file for writing starting at the current end of the file.
    • RANDOM - Opens file for reading and writing.
  • numvar is a numeric variable which will contain the channel of the opened file.

OUTPUT#

Format: OUTPUT# channel , io_list

Action: Writes specified data to file

  • channel is the channel opened to the file
    • It is the same variable used with the AS clause of the OPEN statement.
  • io_list is a series of expression separated by semicolons or commas.
    • When a semicolon is used, the two expressions are output without any characters between them.
      • If io_list ends with a semicolon, no line terminator is written.
    • When a comma is used, a tab character (CHR$(9)) is output between the two expressions.
      • If io_list ends with a comma, the output data is terminated with a tab character.
    • If io_list ends with neither a semicolon or comma, the output data is terminated with a carriage return and line feed.
Examples:

Coming soon.


LINE INPUT

Coming soon.


READ

Coming soon.


WRITE

Coming soon.


CLOSE

Coming soon.


FILEPOS

Coming soon.


SET FILE

Coming soon.

⚠️ **GitHub.com Fallback** ⚠️