HELP DISCOUT                                  Steven Hardy, January 1978
                                      Revised by John Williams, May 1993

    discout(file_name) -> char_cons

The procedure discout takes a file name as argument, and returns a
character consumer procedure (analogous to * charout), which will write
characters to the specified file.

For example:

    discout('myfile') -> outchar;

This creates a character consumer procedure for the file 'myfile' and
assigns it to the variable "outchar". Each time the procedure "outchar"
is applied to a character, like this:

    outchar(char);

the given character char is output to the file 'myfile'.

discout can also be given a * DEVICE record as argument, in which case a
procedure that writes successive characters to that device is created.

The underlying device record associated with a character consumer
produced by discout can be accessed with the procedure * discout_device.
This can be useful if you want to close or flush the device, for
example. See REF * CHARIO for more details.


See also:
    HELP * DISCIN       for creating character repeater procedures
    HELP * DEVICE       introduction to Poplog "device" records
    HELP * OUTCHARITEM  procedure for converting character consumers
                        to item consumers

    REF * CHARIO        reference guide to Poplog character stream i/o


--- C.all/help/discout
--- Copyright University of Sussex 1993. All rights reserved.
