Programmer Guide/Command Reference/WRITELOG: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
WRITELOG <var>text</var> [/Newline &hellip; /Newline]
WRITELOG <var>format</var> <var>args</var> /Format [/Newline &hellip; /Newline]


Write a line to the log window. Use <code>/Clear</code> to empty the log window before text is written.
This command writes a line of text to the [[User Guide/Log_Window|Log-window]].


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]].
WRITELOG <var>text</var> [/Newline &hellip; /Newline] [/Clear]
:Write <var>text</var> to the Log-window.
WRITELOG <var>format</var> <var>args</var> /Format [/Newline &hellip; /Newline] [/Clear]
:Write a formatted text composed by the specified [[Programmer_Guide/General_Descriptions/Format_Strings_and_Rules|format string]] <var>format</var> and the arguments <var>args</var>.


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.
;Options:
:*<code>/Format</code>: mandatory option to write formatted text
:*<code>/Clear</code>: clear the Log-window before writing text
:*<code>/Newline</code>: each /N adds an empty line after the written text


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).
;Note:The output starts always at the begin of the next line. Its not possible to overwrite lines or to append text to the last line.


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>]].
;See also:macros [[Programmer_Guide/Macro_Library/LOGWINDOW|<code>LogWindow</code>]], [[Programmer_Guide/Macro_Library/CONLOG|<code>ConLog</code>]], [[Programmer_Guide/Macro_Library/BUTIL#MsgBox|<code>BUtil MsgBox</code>]], [[Programmer_Guide/Macro_Library/UM|<code>UM</code> and <code>EM</code>]]

Latest revision as of 17:32, 1 February 2016


This command writes a line of text to the Log-window.

WRITELOG text [/Newline … /Newline] [/Clear]
Write text to the Log-window.
WRITELOG format args /Format [/Newline … /Newline] [/Clear]
Write a formatted text composed by the specified format string format and the arguments args.
Options
  • /Format: mandatory option to write formatted text
  • /Clear: clear the Log-window before writing text
  • /Newline: each /N adds an empty line after the written text
Note
The output starts always at the begin of the next line. Its not possible to overwrite lines or to append text to the last line.
See also
macros LogWindow, ConLog, BUtil MsgBox, UM and EM

Navigation menu

Personal tools