next up previous contents index
Next: Removing links to external Up: Subroutines and external files Previous: Handling errors that arise

Linking external files to [B/D]

 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Syntax

  1. BD>channel : iI tex2html_wrap_inline33794 = [P] F tex2html_wrap_inline33712

  2. BD>channel : oI tex2html_wrap_inline33798 = [P] F tex2html_wrap_inline33712

where tex2html_wrap_inline33786 is an integer representing an input channel number; tex2html_wrap_inline33788 is an integer representing an output channel number; F is a sequence of alphabetic characters representing a valid filename; and P is a sequence of alphabetic characters representing a path to a directory containing, or to contain, the file.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

The CHANNEL:  command is used to specify and attach external files, for output and input, to the program. The first form of the syntax is used to associate external files with input channels, of which there are six in all. The second form of the syntax is used to associate external files with output channels, of which there are four in all.

If no file path P is given, the sequence of directories given by the search path is searched in order to find the file F.

If an output channel is being declared, and if the external file cannot be found, then it will be created, either in the current directory or in the directory indicated by the path P if one was supplied. However, if an output channel is being declared and the external file does exist then its contents will be overwritten. Beware that you do not remove precious file contents accidentally.

If an input channel is being declared, and if the external file cannot be found, an error will be reported.

You may not associate an output channel with an external file which is currently associated with an input channel. You may not associate an input channel with an external file which is already associated with an input channel. You may associate an input channel with an external file that is already linked with an output channel (provided that the output channel is not currently being used for output; the attempt will result in the reporting of an error). In this case, the external file will be closed, and the output channel linked to it removed. Finally it is then linked to the input channel. This provides a limited means of interactively creating macro files as outputs for further use as inputs.  


next up previous contents index
Next: Removing links to external Up: Subroutines and external files Previous: Handling errors that arise

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