Blitz3D+ Command Reference

Print [string$]

Parameters

string$ (optional) - text to print; "" just moves to the next line (default)

Description

Prints a line of text on the screen and moves down to the next line.

Print is the quick, console-style way to get text up: each call writes at the cursor position and moves the cursor to the start of the next line, scrolling the screen up when it reaches the bottom. With no string it just skips a line. Numbers print fine on their own or glued into strings: Print "Lives: "+lives.

It always prints to the front buffer, so the text appears immediately - no Flip needed, whatever SetBuffer is pointing at. That makes it great for quick experiments, loading progress and text adventures, but in a Cls/draw/Flip game loop the flip will promptly cover it up - use Text on the back buffer there instead.

The cursor can be moved with Locate, and Write prints without ending the line. Text drawn this way uses the current Color and font.

See also: Write, Locate, Input, Text.

Example

; Print Example
; -------------

; Print writes a line of text and then moves down to the next line
Print "Blitz3D high scores"
Print "-------------------"
Print "1st  ZAP  12500"
Print "2nd  BOB   9800"
Print "3rd  MEL   7250"

; A Print with no string just leaves a blank line
Print

Print "Each Print starts a new line automatically."

Print ""
Print "Press any key to close the example"
WaitKey

End

Index