xHarbour Reference Documentation > Function Reference |
Writes values to the standard error device.
OutErr( <expression,...> ) --> NIL
The return value is always NIL.
OutErr() evaluates <expression,...> and writes the resulting values to the standard error device. This allows for collecting output in a file when program output is redirected on the command line to the error device (c:\xhb\program.exe 2> logfile.txt).
OutErr() works identical as OutStd() except for using a different output channel.
See also: | DispOut(), OutStd() |
Category: | Output functions |
Source: | rtl\console.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The examlple illustrates how output sent to the standard devices // STDOUT and STDERR can be redirected into two different files. To // run the example, use this command line syntax: // // c:\xhb\Test.exe > regular.txt 2> error.txt PROCEDURE Main OutStd( "Regular log info", Date(), Time() ) OutErr( "Error log info", Date(), Time() ) RETURN
http://www.xHarbour.com