![]() ![]() |
Reference Type: Supported, Category: XGF Function Library, ICR#: 3173
The SAY^XGF API outputs a string to the screen (with optional positioning and attribute control).
Use this API rather than the M WRITE command to output strings to the screen. The row and column parameters specify where to print the string:
A call to the PREP^XGF(): Screen/Keyboard Setup API must be made at some point prior to calling SAY^XGF.
You can specify row and column parameters relative to the current $X and $Y by specifying + or - to increment or decrement $X or $Y by 1. You can increment or decrement by more than 1 if you add a number as well (e.g., "-5" or "+10").
NOTE: You must use quotes to pass a "+" or "-"; otherwise, to specify exact locations for row and column, pass numbers.
Without the fourth argument for video attribute, SAY^XGF displays the string using the current video attribute. With the fourth argument, SAY^XGF displays the string using the attributes you specify. SAY^XGF changes the video attribute only for the output of the string; upon termination of the function, it restores video attributes to their state prior to the function call.
REF: For a discussion of valid video attribute codes for the video attribute parameter, see the SETA^XGF(): Screen Video Attributes API.
SAY^XGF([row][,col,]str[,atr])
row: |
(optional) Row position to start WRITE. |
col: |
(optional) Column position to start WRITE. |
str: |
(required) String to WRITE. |
atr: |
(optional) Video attribute with which to WRITE
string.
|
REF: See also: IOXY^XGF(): Screen Cursor Placement and SAYU^XGF(): Screen String with Attributes APIs.
$X and $Y: |
Set to position of the last character output. |
For example, to print "Hello, World" in the center of the screen, in the current video attribute, do the following:
>D SAY^XGF(11,35,"Hello World") |
To print "ERROR!" at (row,col) position ($X+1,$Y+5), in reverse and bold video attributes, do the following:
>D SAY^XGF("+","+5","ERROR!","R1B1") |
To print "..." at the current cursor position, in the current video attribute, do the following:
>D SAY^XGF(,,"...") |