Function OutStd() Foundation
Outputs a list of expressions to the standard output device.
OutStd( <Expression,...> ) --> NIL
The return value of OutStd() is always NIL.
The output function OutStd() outputs to the operating system level and sends the values of <Expression,...> to the standard output device. It works much like the function QOut(), but does not use the common Xbase++ output routines.
Since the function OutStd() performs output on the operating system level, it can be re-directed using the re-directing operators (>, >> and |). For example, the output of an Xbase++ program may be re-directed to a file.
// The example demonstrates the use of OutStd().
PROCEDURE Main
LOCAL dDate := Date()
CLS
OutStd( "Today is", CDow(dDate) + "," , CMonth(dDate),;
LTrim(Str(Day(dDate)))+ "," , Year(dDate) )
RETURN
// In this example the output of the program SayDate
// is redirected to a file.
C:>SAYDATE.EXE > OUTPUT.ASC
// The example demonstrates that FWrite() can be used instead
// of OutStd(). No screen output is created in this example.
// This is common practice in CGI programs.
#include "fileio.ch"
#define CRLF Chr(13)+Chr(10)
PROCEDURE AppSys
// No application window = no screen output
RETURN
PROCEDURE Main
OutStd( "Hi Jo" )
FWrite( FH_STDOUT, CRLF + "Have a good day!" )
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.