LIST - source-solutions/HELP GitHub Wiki

LIST


LIST [# file_num;] [line_number_0][, ][line_number_1]

Prints the program to the screen or a file, starting with line_number_0 up to and including line_number_1. Also stops program execution and returns control to the user. In all cases, any further statements in a compound after LIST will be ignored, both in a program and in direct mode.

When listing to the screen, the same control characters are recognised as in the PRINT statement.

Notes

  • In Microsoft BASIC, LIST will not show line numbers 65531 to 65535 inclusive.
  • SE Basic IV's line range is currently [0 to 16383].
  • There is no LLIST command. Instead, LIST can be directed to the printer stream using LIST #.

Parameters

  • line_number_0 and line_number_1 are line numbers in the range [0 to 65529] or a . to indicate the last line edited. The line numbers do not need to exist; they specify a range. If the range is empty, nothing is printed.
  • The string expression file_num is a valid stream indicating the file to list to.

Errors

  • A line number is greater than 65529: Syntax error.
  • file_num has a string value: Type mismatch.
⚠️ **GitHub.com Fallback** ⚠️