xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

OutStd()

Writes values to the standard output device.

Syntax

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

Arguments

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

Return

The return value is always NIL.

Description

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.

Info

See also:DispOut(), FWrite(), OutErr(), QOut() | QQOut()
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