next up previous contents index
Next: User-defined error handling Up: Subroutines and external files Previous: Temporarily diverting program flow

Redirecting output

 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Syntax

BD>ochannel : (I) tex2html_wrap_inline33712

where either tex2html_wrap_inline33914 , representing the interactive screen, or tex2html_wrap_inline33788 is an integer representing an output channel number.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

The OCHANNEL:  command specifies the channel that should be used for output until a further OCHANNEL:  command is issued. The output channel is reset to zero (interactive screen) whenever a RESTART:  command is issued, but not when a CLEAR:  command is issued.

As an example, consider the fragment of code shown in Figure 2.3. The commands in this fragment (1) link an output channel to an external file (which will be created if it does not already exist); (2) redirect output to this file; (3) print a message which will appear as text at the head of this file; and (4) redirect output back to the screen.

  figure1866
Figure 2.3:  Redirecting output

 



David Wooff
Wed Oct 21 15:14:31 BST 1998