xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

OutErr()

Writes values to the standard error device.

Syntax

OutErr( <expression,...> ) --> NIL

Arguments

<expression,...>
This is a comma separated list of expressions whose values are output.

Return

The return value is always NIL.

Description

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.

Info

See also:DispOut(), OutStd()
Category: Output functions
Source:rtl\console.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe