| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Writes values to the standard output device.
OutStd( <expression,...> ) --> NIL
The return value is always NIL.
OutStd() evaluates <expression,...> and writes the resulting values to the standard output 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 > logfile.txt).
Note: if an xHarbour console application does not require sophisticated screen output, the commands ? and ?? can be replaced with OutStd() by including the file SIMPLEIO.CH.
| See also: | DispOut(), FWrite(), OutErr(), QOut() | QQOut() |
| 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