WPRINT
This page was last modified 13:29, 14 August 2021 by Mars2000you.

Contents

Effect

Displays and formats text and numbers in the specified window.

Note: WPRINT can be replaced by W followed by the "?" character. "W?" will be expanded to "WPRINT" when listing a MSX-BASIC program.

Syntax

WPRINT #<WindowNumber>, USING <ItemFormat>; <Item>;<Item>...

Parameters

<WindowNumber> is a number between 1 and 9. It must always be preceded by # and correspond to a window previously defined with the WINDOW instruction.

<Item> can be a character string, an expression, a variable or a value to display. All four items types can be mixed freely.

Items must be separated by ";". If the last item does not end to ";" CR+LF combination is displayed.

A comma can replace a ";" to separate the items. In case of "," they are separated by tabulator instead of a space.

<Item> can be omitted to display an empty line.

USING <ItemFormat>; is optional. <ItemFormat> is a string that defines how the next items to be displayed must be formatted. When USING is used the type of following usable items depends on the specified format.

<Item> and <ItemFormat> are exactly same as with PRINT instruction. Please see documentation there.

Examples

10 SCREEN0:KEYOFF:WIDTH40
20 WINDOW#1,1,1,38,3
30 WBOX#1
40 LOCATE#1,5,0
50 WPRINT#1,"HELLO"
10 SCREEN0:KEYOFF:WIDTH40
20 WINDOW#1,1,1,38,3
30 WBOX#1
40 LOCATE#1,5,0
50 WPRINT#1,USING"!!!","MSX";"Resource";"Center"

Related to

LOCATE, PRINT, WBOX, WINDOW

Compatibility

Delta BASIC