----------------------------------------------------------------------
--- Knud van Eeden --- 28 November 2010 - 03:57 am -------------------

Computer: Editor: Text: TSE: STDIN / STDOUT / STDERR: How to use STDIN, STDOUT and STDERR with TSE?

---

TSE supports STDIN, STDOUT and STDERR.

===

-STDIN

===

TSE can read from STDIN, so you can pipe text into it
(and possibly through it, e.g. by capturing that STDIN input and
writing it out again to e.g. STDOUT).

E.g.

--- cut here: begin --------------------------------------------------
dir | g32.exe
--- cut here: end ---------------------------------------------------- will edit a file called --- cut here: begin --------------------------------------------------
[<stdin>]
--- cut here: end ---------------------------------------------------- containing a listing of the current directory. === E.g. That will show a screen output similar to the following: --- cut here: begin --------------------------------------------------
Volume in drive C is OS Serial number is 6e38:fdbf Directory of C:\Temp\DDD\* 28-11-2010 04:05 <DIR> . 28-11-2010 04:05 <DIR> .. 27-11-2010 18:39 318,951 g32.exe 28-11-2010 04:04 8 thisisanothertest.txt 28-11-2010 04:04 7 thisisatest.txt 318,966 bytes in 3 files and 2 dirs 327,680 bytes allocated 77,637,812,224 bytes free
--- cut here: end ---------------------------------------------------- === -STDOUT === Use e.g. the fWrite() function to write to STDOUT === E.g. --- cut here: begin --------------------------------------------------
PROC Main() // STRING s[255] = "" // s = "this is a test" fWrite( _STDOUT_, s ) // // to add a newline, add it manually s = "this is another test" + Chr(13) + Chr(10) fWrite( _STDOUT_, s ) // END
--- cut here: end ---------------------------------------------------- === -STDERR Similarly, using _STDERR_ --- cut here: begin --------------------------------------------------
PROC Main() // STRING s[255] = "" // s = "this is a test" fWrite( _STDERR_, s ) // // to add a newline, add it manually s = "this is yet another test" + Chr(13) + Chr(10) fWrite( _STDERR_, s ) // END
--- cut here: end ---------------------------------------------------- === Book: see also: === Diagram: see also: === File: see also: === File: version: control: see also: === Help: see also: === Image: see also: === Internet: see also: === Podcast: see also: === Record: see also: === Screencast: see also: === Table: see also: === Video: see also: === <version>1.0.0.0.9</version> ----------------------------------------------------------------------

Share |

This web page is created and maintained using the Semware TSE text editor