GRAPHIC PRINT statement    

Purpose

Output text to the selected graphic target.

Syntax

GRAPHIC PRINT [EXPRLIST] [POS(n)] [SPC(n)] [TAB(n)] [,] [;]...

Remarks

Prior to any graphical operations are executed, you should be certain that a graphic target has been selected, either by default, or with GRAPHIC ATTACH.  The text color and the text background color are set with GRAPHIC COLOR.  Text which extends beyond the bounds of the graphic target is clipped.  The size of the text to be printed can be determined in advance with GRAPHIC TEXT SIZE, and formatted to fit a particular field with GRAPHIC SPLIT.  Drawing begins at the last point referenced by another GRAPHIC procedure, or the point specified by GRAPHIC SET POS. The upper left corner of the text is positioned at the POS.

GRAPHIC PRINT has the following parts, which may occur in any order and quantity, within a single statement:

EXPRLIST

Numeric and/or string expression(s) to be written to the graphic target.  A semicolon can be used as separator between multiple expressions in the same statement.  Upon completion, the POS is moved to the left margin of the next line.

POS(n)

An optional function used to set the POS to the horizontal page unit specified by the numeric argument,  Multiple uses of the POS function is permitted in a single statement.  The vertical position of the POS is never changed.

SPC(n)

An optional function used to insert n spaces into the printed output.  Multiple use of SPC is permitted in a single statement.  Values of n less than 1 are ignored.

TAB(n)

An optional function used to tab to the nth column before printing the next expression.  Multiple use of TAB is permitted in a single statement.  Since TAB references columns, rather than pixels, it can give unpredictable results when used with a variable width font.  It is best used with a fixed width font.

; ,

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 is a semicolon or comma, the POS is maintained at the current location, rather than the default action of moving to the start of the next line.  For example:

GRAPHIC PRINT "Hello";

GRAPHIC PRINT " world!";

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

If you omit all arguments, GRAPHIC PRINT just moves the POS to the left margin of the next line.  Any control codes, such as Carriage Return, Line-Feed, and Backspace are not interpreted.  They will display as symbols in the currently selected font.

USING$ is a separate function, which may be included in the ExprList.  See the USING$() function for more information.

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.

See also

GRAPHIC ATTACH, GRAPHIC CELL, GRAPHIC CHR SIZE, GRAPHIC SET FONT, GRAPHIC GET POS, GRAPHIC SET POS, GRAPHIC SET SCROLLTEXT, GRAPHIC SET WORDWRAP, GRAPHIC SET WRAP, GRAPHIC SPLIT, GRAPHIC TEXT SIZE, USING$