Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

SAYU^XGF(): Screen String with Attributes

Reference Type: Supported, Category: XGF Function Library, Integration Agreement: 3173


This API outputs a string to the screen (with optional position and attribute control), including the ability to underline an individual character.

This API is similar to SAY^XGF. The difference is that the first ampersand ("&") character has a special meaning in the output string; it acts as a flag to indicate that the next character should be underlined. You are only allowed one underlined character per call. Typically you would use SAYU^XGF when writing a menu option's text, in order to underline that option's speed key.

A call to the PREP^XGF(): Screen/Keyboard Setup API must be made at some point prior to calling SAYU^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.

If the first ampersand is followed by another ampersand, this initial "&&" is interpreted and displayed as one ampersand character, "&", and you still have the opportunity to use a single ampersand as an underlining flag.



Input Parameters


(optional) Row position to start WRITE.


(optional) Column position to start WRITE.


(required) String to WRITE ("&" underlines next character).


(optional) Video attribute with which to WRITE a string.

NOTE: For a description of atr codes, please refer to the $$READ^XGF(): Read Using Escape Processing API.

Output Parameters


Set to the position of the last character output.

NOTE: See also: IOXY^XGF(): Screen Cursor Placement and SAY^XGF(): Screen String APIs.


For example, to print Save at row 5, column 10, do the following:

>D SAYU^XGF(5,10,"&Save")


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.