Skip to content
Andrew Owen edited this page May 30, 2023 · 2 revisions

PRINT


PRINT [# stream,] [expr_0|;|,|SPC( n)|TAB( n)] ... [USING format; uexpr_0 [{;|,} uexpr_1] ... [;|,]]

Writes expressions to the screen, a file or another device. If stream is specified, output goes to the file or device open under that number. ? is a shorthand for PRINT.

When writing a string expression to the screen, the following control characters have special meaning. Other characters are shown as their corresponding glyph in the current codepage.

Code Chr Effect
$07 BEL Beep the speaker.
$08 BS Erase character in previous column and move cursor back.
$09 HT Jump to the next 8-cell tab stop.
$0A LF Go to the leftmost column in the next row.
$0B VT Move the cursor to the top left of the screen.
$0C FF Clear the screen.
$0D CR Go to the leftmost column in the next row.
$1C FS Move the cursor one column to the right.
$1D GS Move the cursor one column to the left.
$1E RS Move the cursor one row up.
$1F US Move the cursor one row down.

Note: In SE Basic IV, anything after PRINT CHR$(12) is not printed.

Expressions can optionally be separated by one or more keywords:

Keyword Effect
; Attaches two expressions without any space in between.
SPC(n) Produces n spaces, where n is a numeric expression.
, The expression after will be positioned at next available tab stop.
TAB(n) Moves to column n, where n is a numeric expression.
' Inserts a newline.

If the print statement does not end in one of these four separation tokens, a newline is printed after the last expression. String expressions can be separated by one or more spaces, which has the same effect as separating by semicolons.

Welcome to the SE BASIC wiki


  • Press RETURN to return to this menu.
  • Enter the name of a TOPIC to display it.
  • Enter EXIT to return to BASIC.

Choose from the following topics:

  1. Quick start guide: QUICK
  2. User's guide: USER
  3. Configuration guide: CONFIG
  4. Language guide: LANGUAGE
  5. Language reference: BASIC
  6. Technical reference: TECH
  7. Developer's guide: DEV
  8. Acknowledgemets: CREDITS
  9. Licenses: LICENSE
Clone this wiki locally