Difference between revisions of "Programmer Guide/Command Reference/WRITELOG"

From STX Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
  WRITELOG <var>text</var> [/Newline &hellip; /Newline]
 
  WRITELOG <var>text</var> [/Newline &hellip; /Newline]
 
  WRITELOG <var>format</var> <var>args</var> /Format [/Newline &hellip; /Newline]
 
  WRITELOG <var>format</var> <var>args</var> /Format [/Newline &hellip; /Newline]
 +
 +
WRITELOG [/Newline &hellip; /Newline] [[Programmer_Guide/Command_Reference_Options/-|/-]] <var>file</var> <var>text</var>
 +
WRITELOG /Format [/Newline &hellip; /Newline] [[Programmer_Guide/Command_Reference_Options/-|/-]] <var>file</var> <var>format</var> <var>args</var>
 +
This {{Stx}} command writes a line of text to the log window (the tiny baby window you normally wonder what it is good for). Use <code>/Clear</code> to empty the log window before text is written.
  
Write a line to the log window. Use <code>/Clear</code> to empty the log window before text is written.
+
Format strings (the <code>format</code> when using the <code>/Format</code> option) are described in [[Programmer_Guide/General_Descriptions/Format_Strings_and_Rules|Format Strings and Rules]].
 
 
Format strings (the <code>format</code> when using the <code>/Format</code> option) are described in the topic [[Programmer_Guide/General_Descriptions/Format_Strings_and_Rules|Format Strings and Rules]].
 
  
 
Generally, the arguments to the <code>WRITELOG</code> command are the same as for the <code>[[Programmer_Guide/Command_Reference/WRITE|WRITE]]</code> command. Refer to the <code>[[Programmer_Guide/Command_Reference/WRITE|WRITE]]</code> documentation for more details.
 
Generally, the arguments to the <code>WRITELOG</code> command are the same as for the <code>[[Programmer_Guide/Command_Reference/WRITE|WRITE]]</code> command. Refer to the <code>[[Programmer_Guide/Command_Reference/WRITE|WRITE]]</code> documentation for more details.
Line 11: Line 13:
 
Instead of the <code>WRITELOG</code> command, you may use the macros <code>[[Programmer Guide/Command Reference/LOGMSG|LOGMSG]]</code> or <code>[[Programmer_Guide/Macro_Library/BUTIL#LOGMSG|BUTIL LOGMSG]]</code>, which append some useful information to the text (e.g. the application nameand the date and time of emitting the message).
 
Instead of the <code>WRITELOG</code> command, you may use the macros <code>[[Programmer Guide/Command Reference/LOGMSG|LOGMSG]]</code> or <code>[[Programmer_Guide/Macro_Library/BUTIL#LOGMSG|BUTIL LOGMSG]]</code>, which append some useful information to the text (e.g. the application nameand the date and time of emitting the message).
  
If you want to show your message more interactively (i.e., in a dialog box), you may consider the simple functions [[Programmer_Guide/Macro_Library/StdLib#UM_and_EM|<code>UM</code> and <code>EM</code>]].
+
If you want to show your message more interactively (i.e., in a dialog box), you may consider the {{STx}} functions [[Programmer_Guide/Macro_Library/StdLib#UM_and_EM|<code>UM</code> and <code>EM</code>]].

Revision as of 15:25, 8 May 2014

WRITELOG text [/Newline … /Newline]
WRITELOG format args /Format [/Newline … /Newline]

WRITELOG [/Newline … /Newline] /- file text
WRITELOG /Format [/Newline … /Newline] /- file format args

This STx command writes a line of text to the log window (the tiny baby window you normally wonder what it is good for). Use /Clear to empty the log window before text is written.

Format strings (the format when using the /Format option) are described in Format Strings and Rules.

Generally, the arguments to the WRITELOG command are the same as for the WRITE command. Refer to the WRITE documentation for more details.

Instead of the WRITELOG command, you may use the macros LOGMSG or BUTIL LOGMSG, which append some useful information to the text (e.g. the application nameand the date and time of emitting the message).

If you want to show your message more interactively (i.e., in a dialog box), you may consider the STx functions UM and EM.