U_GETTXT

Get text from the text library

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall U_GETTXT(facility, text_number, text[, text_length])

facility

The name of the facility to choose from in the text message library. (a3)

text_number

The text message number. (n)

text

Returned with the message text. (a)

text_length

(optional) Returned with the length of the text. (n)

U_GETTXT gets a line of text from the text message library.

The text message library is opened by U_START. It contains all Toolkit error and text messages, as well as any customized messages you add using the Synergy UI Toolkit Control Panel.

The facility name for Toolkit text messages is DTK. If you’ve created your own facility in the text message library, use your own unique facility name.

The maximum size of Toolkit messages is 200 characters.

Synergy UI Toolkit Control Panel (synctl), for information on determining the text message file in use and customizing text messages

The following example uses the UI Toolkit error “A window with that name already exists” as its own error message.

subroutine create_window
       a_name   ,a   ;Window name to create
.include "WND:tools.def"
.include "WND:dtkmsg.def"
record
       sts   ,i4
       len   ,i4
       text   ,a200
             .
             .
             .
proc
       call chk_if_exists      ; If it exists, sts set to 1
       if (sts)
         begin
           xcall u_gettxt("DTK", DTK_DUPNAME, text, len) ;DTK_DUPNAME
           xcall u_message(text(1:len))       ; is defined in dtkmsg.def
           xreturn
         end
       .
       .
       .
endsubroutine