msg_get_format()
Return format information for a message.
Syntax
msg_get_format(message_ID)
Parameter
Parameter | Definition |
---|---|
message_ID | integer that identifies a message |
Description
The msg_get_format() function returns the format string retrieved from the message catalog. It returns the following string if it cannot retrieve the catalog or message:
CATALOG: XXX/XXX, MSGNUM: XXX
Example
The following example shows a sample message catalog:
VENDOR_ID 1
VENDOR BMC Software
TOOL_ID 23
TOOL PATROL Demo
VERSION 1.0
DATE 13-Mar-1997
#----------------------------------------------------
ID 2 DEMO_GREET INFO CURRENT
MESSAGE "G'Day %s, how's your %s?\n"
VENDOR BMC Software
TOOL_ID 23
TOOL PATROL Demo
VERSION 1.0
DATE 13-Mar-1997
#----------------------------------------------------
ID 2 DEMO_GREET INFO CURRENT
MESSAGE "G'Day %s, how's your %s?\n"
The following example of the msg_get_format() function uses the preceding message catalog:
print("msg_get_format=", msg_get_format(DEMO_GREET), "\n");
print("msg_get_format=", msg_get_format(999999999), "\n");
print("msg_get_format=", msg_get_format(999999999), "\n");
The previous commands produce the following output:
msg_get_format=G'Day %s, how's your %s?
msg_get_format=Error: Patrol-Message-Unknown: Catalog 3b9/ac
MsgNum 2559
msg_get_format=Error: Patrol-Message-Unknown: Catalog 3b9/ac
MsgNum 2559