TXT.PRINT method

Syntax | TXT.PRINT([ExprList] [SPC(n)] [TAB(n)] [,] [;]...)

Remarks

Write text data to the TEXT WINDOW at the current caret location. The TXT.PRINT method has the following parts, which may occur in any order and quantity:

ExprList: Numeric and/or string expression(s) to be written to the TEXT WINDOW.

SPC(n) | An optional function used to insert n spaces into the printed output. Multiple use of the SPC argument is permitted in TXT.PRINT, such as positions between expressions. Values of n less than 1 are ignored.
TAB(n) | An optional function used to tab to the nth column before printing an expression. Multiple use of the TAB argument is permitted in TXT.PRINT, such as positions between expressions. Values of n less than 1 are ignored.

; and , are special characters that determine the position of the next text item printed. A semicolon (;) means the next text item is printed immediately; a comma (,) means the next text item is printed at the start of the next print zone. Print zones begin every 14 columns.

If the final argument of TXT.PRINT is a semicolon or comma, the caret position is maintained at the current location, rather than the default action of moving the print position to the start of the next line. For example:

TXT.PRINT "Hello";

TXT.PRINT " world!";

...produces the contiguous result "Hello world!"

If you omit all arguments, TXT.PRINT prints a blank line. Printing always begins at the current caret position.

Any control codes, such as Carriage Return, Line-Feed and Backspace are not interpreted. They will display on the screen as symbols.

It is not possible to print a User-Defined Type (UDT), a Variant, an object variable, or an entire array. Individual member values must be extracted with the appropriate function before they can be displayed.

| TXT.WAITKEY$
Syntax | TXT.WAITKEY$ [TO WaitVar$] WaitVar$ = TXT.WAITKEY$

Remarks

Reads a keyboard character, waiting until one is ready. It removes the character from the keyboard buffer for the Text Window, and optionally assigns it to the string variable. If the TO clause is omitted, the keyboard character is discarded.

TXT.WAITKEY$ returns a string of 0 or 1 characters that reflects the status of the keyboard buffer for the Text Window. A null string (LEN=0) means that there was an error, such as the case when no Text Window currently exists.

A string length of one means that a standard key was pressed and the string contains the character. A value between 1 and 31 indicates a control code.

TXT.WAITKEY$ only processes standard characters. Extended keys, like function keys and the insert key, are ignored.