lr_message

Sends a message to the log and output window.

C Language

int lr_message( char *format, exp1, exp2,...expn.);
Example: lr_messageMessage Functions

Java Language

int lr.message( String message ); 
Example: lr.messageMessage FunctionsJava Syntax

Arguments

NameComments
format C LanguageA formatted string. If it is a literal string, enclose it with quotation marks. Use the standard Message Formatting that are available for printf to set the format for the expressions you want to print.
exp1, exp2,.. expnC LanguageThe expressions (variables) to be formatted and printed.
messageObject orientedA string containing the message to send to the Output window. See and Java String Arguments.

The lr_message function sends a message to the log file and output window. When run in VuGen, the output file is output.txt.

Use lr_log_message instead of this function to send the message only to the log file. This conserves the network and controller resources required for sending messages to the output.

To send a message to the output file, you must enable logging in the runtime settings, and select Always send messages. If you select Send messages only when an error occurs, there is no output from this function. lr_set_debug_message calls can also affect the output.

In the log file, this function does not list the location and line number from where the message was issued. To issue a message with those details, use lr_output_message.

statement

Output

lr_message("a message") a message
lr_output_message("a message"); Action(4): a message

Return Values

If this function succeeds, it returns the length of the message that was sent. If the function fails, it returns a negative number.

Parameterization

You cannot use standard parameterization for any arguments in this function.

Concept Link IconSee Also