Please enable JavaScript to view this site.

A-Shell Reference

Largely rewritten October 2017

//TEXTOUT, x, y, text

TEXTOUT outputs a line of text starting at the specified position.

Parameter

Description

x

Starting horizontal position, using the current mapping units. Note that -1 may be used to specify the current position; this can be useful when you don't know the position.

y

Starting vertical position, using the current mapping units. Note that the position marks the upper right corner of the cell in which the first character is printed. This is usually a few pixels above the tops of the letters. Also note that -1 may be used to specify the current position; this can be useful when you don't know the position.

text

A string of text to output, up to a maximum of 512 characters (after expansion of any variables). It is not necessary to quote this argument, even if it contains embedded commas. See explanatory note under TEXTINDENT.

 

For information on printing special characters and symbols, see Printing Special Symbols.

Comments

TEXTOUT does not change the current print cursor position.

Ordinary text lines in the print file are essentially processed as if they were preceded by TEXTOUT,-1,-1, (i.e. x and y set to the current position), except:

Unlike "real" TEXTOUT directives, ordinary text lines do update the current position. Normally this will be the first position on the next line, based on the current vertical motion index as set by the last SETVMI or RESETLPP directive, unless the line ends with "\" (see next).
Ordinary text lines that end in "\", the current position is set just past the last character on the line.

Like nearly all printer output, TEXOUT directives and ordinary text lines print in the current font, using the current pen.

For simple cases of changing fonts in the middle of a line, the "\" technique mentioned above works reasonably well. See the sample GDI printfile in Writing GDI Print Directives for an example. But for more complex formatted printing with many font, color, and other changes mid-line or mid-paragraph, XTEXT will be much more efficient.

See Also