Available on: all targets ✓ verified

PRINT BUFFER

This is a specific variant of PRINT that can be used to print large amount of text. The PRINT BUFFER instruction does not have the limits of PRINT strings, and is able to print any file that have been loaded. An item or a list of items can follow the command. The list of items can consist of any group of buffers. Each element in the list must be separated by either a semi-colon ; or a comma ,. A semi-colon prints the data immediately after the previous value, whereas a comma first moves the cursor to the next TAB position on the screen.

Normally the cursor will be advanced downwards by a single line after each PRINT BUFFER instruction. This can be suppressed by adding a separator after the print. As before, a semicolon will preserve the cursor position after the operation, and a comma will place the cursor to the next TAB stop before proceeding.

Finally, it is possible to omit the native conversion of the buffer storage system, if you want to print "as is". In that case you need to use the RAW keyword.

SYNTAX

 PRINT BUFFER buf1 [; [buf2] [; ...] ... ]
 PRINT BUFFER RAW buf1 [; [buf2] [; ...] ... ]
 PRINT BUFFER [expression]{;|,[expression]|;[expression]} ...


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 PRINT BUFFER description
 PRINT BUFFER RAW descriptionRaw
 file := load("example.txt")
 PRINT BUFFER file


Used in:

ABBREVIATION: ? Bf

Join BASIC 10Liner Contest with ugBASIC!

An interesting competition is held at the beginning of each year: the BASIC 10Liner Contest. It is possible to use ugBASIC to participate in the next "BASIC10Liner" competition, in the following categories:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

PRINT BUFFER ↔ ? Bf

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS